Skip to content
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

Can't retrieve mixtool using go get #27

Closed
nlamirault opened this issue Oct 23, 2020 · 11 comments · Fixed by #34
Closed

Can't retrieve mixtool using go get #27

nlamirault opened this issue Oct 23, 2020 · 11 comments · Fixed by #34

Comments

@nlamirault
Copy link

nlamirault commented Oct 23, 2020

Hi,
i try to retrieve mixtool, i've got this error :

$ go version
go version go1.15.3 linux/amd64
$ go get -u github.com/monitoring-mixins/mixtool/cmd/mixtool
# github.com/monitoring-mixins/mixtool/cmd/mixtool
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:32:22: cannot use cli.StringSliceFlag literal (type cli.StringSliceFlag) as type cli.Flag in slice literal:
        cli.StringSliceFlag does not implement cli.Flag (Apply method has pointer receiver)
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:35:3: undefined: cli.BoolTFlag
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:44:15: cannot use cli.Command literal (type cli.Command) as type *cli.Command in slice literal
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:47:18: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in append:
        cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:55:15: cannot use cli.Command literal (type cli.Command) as type *cli.Command in slice literal
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:58:18: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in append:
        cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:66:15: cannot use cli.Command literal (type cli.Command) as type *cli.Command in slice literal
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:69:18: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in append:
        cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:77:15: cannot use cli.Command literal (type cli.Command) as type *cli.Command in slice literal
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:80:18: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in append:
        cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
golang/src/github.com/monitoring-mixins/mixtool/cmd/mixtool/generate.go:77:15: too many errors

Any idea ?
what do you think about provides binaries from releases ?

@sh0rez
Copy link
Collaborator

sh0rez commented Oct 23, 2020

Try to omit -u, this sometimes causes issues

@nlamirault
Copy link
Author

nlamirault commented Oct 23, 2020

Same error. Strange.

@amckinley
Copy link

+1, same problem, with or without the -u flag.

@fionaliao
Copy link

It works for me when the command is run within a Go module.

E.g.

go mod init example.com/test-mixtool
go get github.com/monitoring-mixins/mixtool/cmd/mixtool

Outside of a module, I get the same error message.

So it seems to be something about modules and versioning but I'm not sure about the root cause.

@tomwilkie
Copy link
Member

Just run into this myself; and git clone and then go build in the repo works fine. Go modules are such a pain...

@tomwilkie
Copy link
Member

tomwilkie commented Jan 3, 2021

Note, it looks like GO111MODULE=on go get github.com/monitoring-mixins/mixtool/cmd/mixtool works.

So I suspect its something about the local environments not using go modules for go get. I can't seem to get go get to use modules without explicitly telling it to. Hopefully this will be fixed in a future version of go with go install or something. What a mess.

@nlamirault
Copy link
Author

nlamirault commented Jan 4, 2021

Thanks @brancz it works with :

GO111MODULE=on go get github.com/monitoring-mixins/mixtool/cmd/mixtool

I've got an error on dependency with update :

GO111MODULE=on go get -u github.com/monitoring-mixins/mixtool/cmd/mixtool                                                                                                                                         
go: found github.com/monitoring-mixins/mixtool/cmd/mixtool in github.com/monitoring-mixins/mixtool v0.0.0-20201215163959-44fc090c10e7                                                                               
go: github.com/Masterminds/sprig/v3 upgrade => v3.2.0                                                                                                                                                               
go: github.com/golang/protobuf upgrade => v1.4.3                                                                                                                                                                    
go: github.com/stretchr/objx upgrade => v0.3.0                                                                                                                                                                      
go: gopkg.in/macaron.v1 upgrade => v1.4.0                                                                                                                                                                           
go: golang.org/x/sync upgrade => v0.0.0-20201207232520-09787c993a3a                                                                                                                                                 
go: golang.org/x/tools upgrade => v0.0.0-20210104081019-d8d6ddbec6ee                                                                                                                                                
go: github.com/russross/blackfriday/v2 upgrade => v2.1.0                                                                                                                                                            
go: github.com/inconshreveable/log15 upgrade => v0.0.0-20201112154412-8562bdadbbac                                                                                                                                  
go: github.com/prometheus/client_golang upgrade => v1.9.0                                                                                                                                                           
go: golang.org/x/sys upgrade => v0.0.0-20201231184435-2d18734c6014                                                                                                                                                  
go: github.com/google/go-jsonnet upgrade => v0.17.0                                                                                                                                                                 
go: github.com/go-sql-driver/mysql upgrade => v1.5.0                                                                                                                                                                
go: github.com/bradfitz/gomemcache upgrade => v0.0.0-20190913173617-a41fca850d0b                                                                                                                                    
go: go.uber.org/atomic upgrade => v1.7.0                                                                                                                                                                            
go: github.com/ghodss/yaml upgrade => v1.0.0                                                                                                                                                                        
go: github.com/pkg/errors upgrade => v0.9.1                                                                                                                                                                         
go: github.com/go-logfmt/logfmt upgrade => v0.5.0                                                                                                                                                                   
go: github.com/grafana/grafana upgrade => v6.1.6+incompatible                                                                                                                                                       
go: golang.org/x/lint upgrade => v0.0.0-20201208152925-83fdc39ff7b5                                                                                                                                                 
go: github.com/go-macaron/session upgrade => v1.0.2                                                                                                                                                                 
go: github.com/prometheus/client_model upgrade => v0.2.0                                                                                                                                                            
go: github.com/prometheus/common upgrade => v0.15.0                                                                                                                                                                 
go: github.com/rogpeppe/go-internal upgrade => v1.6.2                                                                                                                                                               
go: github.com/fatih/color upgrade => v1.10.0                                                                                                                                                                       
go: gopkg.in/ini.v1 upgrade => v1.62.0                                                                                                                                                                              
go: gopkg.in/yaml.v2 upgrade => v2.4.0                                                                    
go: github.com/mattn/go-colorable upgrade => v0.1.8
go: github.com/go-macaron/inject upgrade => v0.0.0-20200308113650-138e5925c53b
go: github.com/go-kit/kit upgrade => v0.10.0                                                                                                                                                                        
go: google.golang.org/protobuf upgrade => v1.25.0                                                                                                                                                                   
go: github.com/beorn7/perks upgrade => v1.0.1                                                                                                                                                                       
go: github.com/prometheus/procfs upgrade => v0.2.0                                                                                                                                                                  
go: github.com/opentracing/opentracing-go upgrade => v1.2.0
go: github.com/golang/snappy upgrade => v0.0.2
go: github.com/google/uuid upgrade => v1.1.3
go: github.com/uber/jaeger-lib upgrade => v2.4.0+incompatible
go: github.com/gosimple/slug upgrade => v1.9.0
go: github.com/imdario/mergo upgrade => v0.3.11
go: golang.org/x/crypto upgrade => v0.0.0-20201221181555-eec23a3978ad
go: github.com/Masterminds/semver upgrade => v1.5.0
go: github.com/Masterminds/semver/v3 upgrade => v3.1.1
go: github.com/Unknwon/com upgrade => v1.0.1
go: github.com/spf13/cast upgrade => v1.3.1
go: github.com/lib/pq upgrade => v1.9.0
go: github.com/gobuffalo/packd upgrade => v1.0.0
go: github.com/gobuffalo/envy upgrade => v1.9.0
go: github.com/urfave/cli upgrade => v1.22.5
go: sigs.k8s.io/yaml upgrade => v1.2.0
go: github.com/mattn/go-isatty upgrade => v0.0.12
go: github.com/cpuguy83/go-md2man/v2 upgrade => v2.0.0
go: github.com/huandu/xstrings upgrade => v1.3.2
go: github.com/mitchellh/reflectwalk upgrade => v1.0.1
go: gopkg.in/yaml.v3 upgrade => v3.0.0-20200615113413-eeeca48fe776
go: github.com/davecgh/go-spew upgrade => v1.1.1
go: github.com/grafana/tanka upgrade => v0.13.0
go: github.com/teris-io/shortid upgrade => v0.0.0-20201117134242-e59966efd125
go get: github.com/Unknwon/com@v0.0.0-20180617003950-da59b551951d updating to
        github.com/Unknwon/com@v1.0.1: parsing go.mod:
        module declares its path as: github.com/unknwon/com
                but was required as: github.com/Unknwon/com

@brancz
Copy link
Member

brancz commented Jan 4, 2021

Looks to me that the @unknwon may have recently renamed their github from capitalized to all lowercase ... not exactly sure what best to do.

@roidelapluie
Copy link

go 1.16 will bring some lights: https://tip.golang.org/doc/go1.16#go-command

changing GO111MODULE to on and other improvements.

@apmartins85
Copy link

Hi guys .. same error here:

GO111MODULE=on go get -u github.com/monitoring-mixins/mixtool/cmd/mixtool

go: found github.com/monitoring-mixins/mixtool/cmd/mixtool in github.com/monitoring-mixins/mixtool v0.0.0-20210104103825-ae18e31161ea
go: golang.org/x/crypto upgrade => v0.0.0-20201221181555-eec23a3978ad
go: github.com/rogpeppe/go-internal upgrade => v1.7.0
go: golang.org/x/sys upgrade => v0.0.0-20210123111255-9b0068b26619
go: github.com/google/uuid upgrade => v1.2.0
go: github.com/Masterminds/sprig/v3 upgrade => v3.2.0
go: github.com/imdario/mergo upgrade => v0.3.11
go: github.com/golang/snappy upgrade => v0.0.2
go: gopkg.in/ini.v1 upgrade => v1.62.0
go: github.com/grafana/tanka upgrade => v0.13.0
go: github.com/uber/jaeger-lib upgrade => v2.4.0+incompatible
go: github.com/bradfitz/gomemcache upgrade => v0.0.0-20190913173617-a41fca850d0b
go: github.com/Unknwon/com upgrade => v1.0.1
go: golang.org/x/lint upgrade => v0.0.0-20201208152925-83fdc39ff7b5
go: golang.org/x/sync upgrade => v0.0.0-20201207232520-09787c993a3a
go: github.com/golang/protobuf upgrade => v1.4.3
go: github.com/gobuffalo/packd upgrade => v1.0.0
go: golang.org/x/tools upgrade => v0.1.0
go: google.golang.org/protobuf upgrade => v1.25.0
go: github.com/mitchellh/reflectwalk upgrade => v1.0.1
go: github.com/inconshreveable/log15 upgrade => v0.0.0-20201112154412-8562bdadbbac
go: github.com/huandu/xstrings upgrade => v1.3.2
go: github.com/lib/pq upgrade => v1.9.0
go: github.com/prometheus/client_model upgrade => v0.2.0
go: gopkg.in/yaml.v2 upgrade => v2.4.0
go: github.com/russross/blackfriday/v2 upgrade => v2.1.0
go: github.com/pkg/errors upgrade => v0.9.1
go: github.com/ghodss/yaml upgrade => v1.0.0
go: github.com/prometheus/client_golang upgrade => v1.9.0
go: github.com/stretchr/objx upgrade => v0.3.0
go: github.com/grafana/grafana upgrade => v6.1.6+incompatible
go: github.com/prometheus/procfs upgrade => v0.3.0
go: github.com/go-sql-driver/mysql upgrade => v1.5.0
go: sigs.k8s.io/yaml upgrade => v1.2.0
go: github.com/fatih/color upgrade => v1.10.0
go: github.com/gobuffalo/envy upgrade => v1.9.0
go: github.com/prometheus/common upgrade => v0.15.0
go: github.com/mattn/go-colorable upgrade => v0.1.8
go: gopkg.in/macaron.v1 upgrade => v1.4.0
go: github.com/go-macaron/session upgrade => v1.0.2
go: github.com/go-macaron/inject upgrade => v0.0.0-20200308113650-138e5925c53b
go: github.com/mattn/go-isatty upgrade => v0.0.12
go: gopkg.in/yaml.v3 upgrade => v3.0.0-20210107192922-496545a6307b
go: go.uber.org/atomic upgrade => v1.7.0
go: github.com/urfave/cli upgrade => v1.22.5
go: github.com/cpuguy83/go-md2man/v2 upgrade => v2.0.0
go: github.com/go-kit/kit upgrade => v0.10.0
go: github.com/google/go-jsonnet upgrade => v0.17.0
go: github.com/Masterminds/semver/v3 upgrade => v3.1.1
go: github.com/opentracing/opentracing-go upgrade => v1.2.0
go: github.com/spf13/cast upgrade => v1.3.1
go: github.com/beorn7/perks upgrade => v1.0.1
go: github.com/go-logfmt/logfmt upgrade => v0.5.0
go: github.com/davecgh/go-spew upgrade => v1.1.1
go: github.com/gosimple/slug upgrade => v1.9.0
go: github.com/teris-io/shortid upgrade => v0.0.0-20201117134242-e59966efd125
go: github.com/Masterminds/semver upgrade => v1.5.0
go get: github.com/Unknwon/com@v0.0.0-20180617003950-da59b551951d updating to
	github.com/Unknwon/com@v1.0.1: parsing go.mod:
	module declares its path as: github.com/unknwon/com
	        but was required as: github.com/Unknwon/com

@vicmania2007
Copy link

Hello i am getting the same error as @apmartins85!
@apmartins85 were you able to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants