summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/tools/internal/imports/fix.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-04-01 15:24:11 +0000
committerLibravatar GitHub <noreply@github.com>2025-04-01 16:24:11 +0100
commitfdf23a91de791b813f65c244fd75e3262171f1b0 (patch)
tree6ad5045e17f4520386067e4334e749be09ae1510 /vendor/golang.org/x/tools/internal/imports/fix.go
parentadd a security.md stub, until (if) we determine a fancier security process :w... (diff)
downloadgotosocial-fdf23a91de791b813f65c244fd75e3262171f1b0.tar.xz
update modernc.org/sqlite to v1.37.0-concurrrency-workaround (#3958)
Diffstat (limited to 'vendor/golang.org/x/tools/internal/imports/fix.go')
-rw-r--r--vendor/golang.org/x/tools/internal/imports/fix.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/golang.org/x/tools/internal/imports/fix.go b/vendor/golang.org/x/tools/internal/imports/fix.go
index bf6b0aadd..737a9bfae 100644
--- a/vendor/golang.org/x/tools/internal/imports/fix.go
+++ b/vendor/golang.org/x/tools/internal/imports/fix.go
@@ -559,7 +559,7 @@ func fixImportsDefault(fset *token.FileSet, f *ast.File, filename string, env *P
return err
}
apply(fset, f, fixes)
- return err
+ return nil
}
// getFixes gets the import fixes that need to be made to f in order to fix the imports.
@@ -1030,7 +1030,7 @@ func (e *ProcessEnv) GetResolver() (Resolver, error) {
//
// For gopls, we can optionally explicitly choose a resolver type, since we
// already know the view type.
- if len(e.Env["GOMOD"]) == 0 && len(e.Env["GOWORK"]) == 0 {
+ if e.Env["GOMOD"] == "" && (e.Env["GOWORK"] == "" || e.Env["GOWORK"] == "off") {
e.resolver = newGopathResolver(e)
e.logf("created gopath resolver")
} else if r, err := newModuleResolver(e, e.ModCache); err != nil {