Gopass: Cannot install gopass with go get

Created on 24 Nov 2019  路  9Comments  路  Source: gopasspw/gopass

Summary

I don't know why but when i run go get github.com/gopasspw/gopass
It return this error and then stop install:

# github.com/gopasspw/gopass/pkg/completion/zsh
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:25:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.BoolFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:27:8: undefined: cli.BoolTFlag
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:29:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.Float64Flag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:31:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.GenericFlag (IsSet method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:33:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.Int64Flag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:35:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.Int64SliceFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:37:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.IntFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:39:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.IntSliceFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:41:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.StringFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:43:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.StringSliceFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/zsh/completion.go:43:3: too many errors
# github.com/gopasspw/gopass/pkg/completion/fish
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:42:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.BoolFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:44:8: undefined: cli.BoolTFlag
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:46:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.Float64Flag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:48:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.GenericFlag (IsSet method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:50:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.Int64Flag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:52:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.Int64SliceFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:54:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.IntFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:56:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.IntSliceFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:58:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.StringFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:60:3: impossible type switch case: f (type cli.Flag) cannot have dynamic type cli.StringSliceFlag (Apply method has pointer receiver)
go/src/github.com/gopasspw/gopass/pkg/completion/fish/completion.go:60:3: too many errors

Environment

  • OS: Linux parrot 5.3.0-2parrot2-amd64 #1 SMP Parrot 5.3.9-3parrot2 (2019-11-22) x86_64 GNU/Linux
  • Installation method: go get

Most helpful comment

Can I make a suggestion? Completion is certainly nice, but it is not core functionality. You now have a situation where folks can't install or upgrade. How about taking completion out of the master branch and get us to a situation where we can install. Then, when you get completion working, merge it back in?

All 9 comments

I'm having the same issue.

go version go1.13.4 darwin/amd64 OSX 10.14.5

same with "go version go1.13.4 linux/amd64"
when trying to upgrade with go get -u -v github.com/gopasspw/gopass

Same issue here.
go version go1.13 darwin/amd64

Any traction on this? PR seems to have stalled due to lack of tests or a review and is now out of sync and has conflicts.

Meanwhile, the recommended installation method is completely broken.

Can I make a suggestion? Completion is certainly nice, but it is not core functionality. You now have a situation where folks can't install or upgrade. How about taking completion out of the master branch and get us to a situation where we can install. Then, when you get completion working, merge it back in?

The problem is because in completion.go the case of switch statement type suppose to be the pointer for it to work.

So we have 3 options now:

  • Fix the completion switch case but that will lead to many problem to deal with ( i'm currently working on that but kinda busy now so i will halt until January 18).
  • Change the README file so that instead of download with go install, we manually install with git clone and Makefile.
  • Remove the completion file completely then if the user want to use auto-complete then they will have to manually install it.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Should be fixed now.

Still not fixed. Just did a go get - same issue.

Was this page helpful?
0 / 5 - 0 ratings