1
0
mirror of https://github.com/golang/go synced 2024-10-01 05:28:33 -06:00
go/internal/lsp/cache/modfile.go
Jan Steinke be5259f298 internal/lsp: use x/xerrors to create new errors
This relates to https://github.com/golang/go/issues/31374 and should switch all instances within `gopls` to use `x/errors` instead of `fmt` to create new errors.

Change-Id: I18339b75d12418d852e0dcc2ba0ed6c2970783b3
GitHub-Last-Rev: f4a55d9b79e7458ef1f1e06cb5eabbabd884f321
GitHub-Pull-Request: golang/tools#108
Reviewed-on: https://go-review.googlesource.com/c/tools/+/179880
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-08-06 19:46:56 +00:00

26 lines
630 B
Go

// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cache
import (
"context"
"go/token"
errors "golang.org/x/xerrors"
)
// modFile holds all of the information we know about a mod file.
type modFile struct {
fileBase
}
func (*modFile) GetToken(context.Context) (*token.File, error) {
return nil, errors.Errorf("GetToken: not implemented")
}
func (*modFile) setContent(content []byte) {}
func (*modFile) filename() string { return "" }
func (*modFile) isActive() bool { return false }