tencentyun / coscli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

coscli signurl failed

ryanaltair opened this issue · comments

commented

signurl -t for --time parameter is duplicated to -t for --sesssion-token

coscli signurl --help     
panic: unable to redefine 't' shorthand in "signurl" flagset: it's already used for "time" flag

goroutine 1 [running]:
github.com/spf13/pflag.(*FlagSet).AddFlag(0xc0001a3000, 0xc0001b7180)
        github.com/spf13/pflag@v1.0.5/flag.go:874 +0x6f0
github.com/spf13/pflag.(*FlagSet).AddFlagSet.func1(0xc0001b7180)
        github.com/spf13/pflag@v1.0.5/flag.go:887 +0xa8
github.com/spf13/pflag.(*FlagSet).VisitAll(0xc0001a3400, 0xc000093b58)
        github.com/spf13/pflag@v1.0.5/flag.go:290 +0x94
github.com/spf13/pflag.(*FlagSet).AddFlagSet(0xc0001a3000, 0xc0001a3400)
        github.com/spf13/pflag@v1.0.5/flag.go:885 +0x58
github.com/spf13/cobra.(*Command).mergePersistentFlags(0x194a1e0)
        github.com/spf13/cobra@v1.1.3/command.go:1644 +0x92
github.com/spf13/cobra.stripFlags(0xc00006eac0, 0x1, 0x1, 0x194a1e0, 0x0, 0x1, 0x0)
        github.com/spf13/cobra@v1.1.3/command.go:564 +0x5a
github.com/spf13/cobra.(*Command).Find.func1(0x194a1e0, 0xc00006eac0, 0x1, 0x1, 0x7, 0xc00006eac0, 0x1, 0x1)
        github.com/spf13/cobra@v1.1.3/command.go:623 +0x5c
github.com/spf13/cobra.(*Command).Find.func1(0x1949f60, 0xc00011c190, 0x2, 0x2, 0x13e0b2f, 0xc0001bc000, 0xc000026640, 0xa)
        github.com/spf13/cobra@v1.1.3/command.go:631 +0x11e
github.com/spf13/cobra.(*Command).Find(0x1949f60, 0xc00011c190, 0x2, 0x2, 0x2, 0xc0001ba000, 0x88, 0xc00018bb80, 0xc000093e60, 0x13e0585)
        github.com/spf13/cobra@v1.1.3/command.go:636 +0x8c
github.com/spf13/cobra.(*Command).initCompleteCmd(0x1949f60, 0xc00011c190, 0x2, 0x2)
        github.com/spf13/cobra@v1.1.3/custom_completions.go:167 +0x2cb
github.com/spf13/cobra.(*Command).ExecuteC(0x1949f60, 0x0, 0x0, 0x0)
        github.com/spf13/cobra@v1.1.3/command.go:929 +0x10b
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.1.3/command.go:897
coscli/cmd.Execute()
        coscli/cmd/root.go:32 +0x2d
main.main()
        coscli/main.go:24 +0x25

Fixed in v0.13.0-beta