ryane/aws-keymaster

don't panic when AWS credentials are not found

Opened this issue · 0 comments

ryane commented
panic: NoCredentialProviders: no valid providers in chain

goroutine 1 [running]:
main.regions(0x0, 0x0, 0x0)
    /go/src/github.com/ryane/aws-keymaster/main.go:199 +0x12c
main.importKeyPair(0xc20802a2a0, 0x7, 0xc20802a330, 0xf, 0x0, 0x0, 0x0)
    /go/src/github.com/ryane/aws-keymaster/main.go:116 +0xbf
main.func·001(0xc2080d2000, 0xc92ec8, 0x0, 0x0)
    /go/src/github.com/ryane/aws-keymaster/main.go:56 +0x48d
github.com/spf13/cobra.(*Command).execute(0xc2080d2000, 0xc92ec8, 0x0, 0x0, 0x0, 0x0)
    /go/src/github.com/spf13/cobra/command.go:547 +0x82f
github.com/spf13/cobra.(*Command).Execute(0xc2080d25a0, 0x0, 0x0)
    /go/src/github.com/spf13/cobra/command.go:630 +0x414
main.main()
    /go/src/github.com/ryane/aws-keymaster/main.go:107 +0x866