-
-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot go get staticcheck #653
Labels
invalid
User error and other non-issues
Comments
If you're working in GOPATH mode, either use If you're working in module mode, this shouldn't be happening, unless you're somehow forcing an older version of |
dominikh
added
waiting-for-feedback
Waiting for the user to get back to us
and removed
bug
needs-triage
Newly filed issue that needs triage
labels
Nov 12, 2019
I had the same problem and fixed it setting module mode to go env -w GO111MODULE=on |
dominikh
added
invalid
User error and other non-issues
and removed
waiting-for-feedback
Waiting for the user to get back to us
labels
Oct 17, 2021
nars1
pushed a commit
to YottaDB/YDBGo
that referenced
this issue
Mar 13, 2024
…O111MODULE=off **Problem** After bump YDBGo wrapper version to odd development version v1.2.5 in YDBGo!185, Daily pipeline failed with this error. ```shell $ go get -u golang.org/x/lint/golint 345# golang.org/x/tools/go/types/objectpath 346/go/src/golang.org/x/tools/go/types/objectpath/objectpath.go:397:10: meth.Origin undefined (type *types.Func has no field or method Origin) ``` **Cause** The cause of this problem likely to be `GO111MODULE=off` (Reference : dominikh/go-tools#653, #47). From the reference GO111MODULE=off might have some problem with linter. **Solution** Change `GO111MODULE=off` to `GO111MODULE=on` but in only lint_code section to reduce impact to the whole pipeline. But after `GO111MODULE=on` some change need to be apply here because we're using Go module. After some research, `go get -u golang.org/x/lint/golint` need to change to `go install golang.org/x/lint/golint@latest`. `go get` when `GO111MODULE=off` will download source package and compiled it to a binary but `GO111MODULE=on`, it won't. So, `go install` would be a solution because it will download source code and compile it to binary as we want. (Reference : https://medium.com/@chaewonkong/difference-between-go-get-and-go-install-in-go-a076d7352186)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run
go get
it returns the following error:go version:
go version go1.13.3 darwin/amd64
go env:
The text was updated successfully, but these errors were encountered: