INNER CODE UNIT · Go
main
google/go-containerregistry · cmd/krane/main.go:48
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
defer cancel()
keychain := authn.NewMultiKeychain(
authn.DefaultKeychain,
google.Keychain,
github.Keychain,
amazonKeychain,
azureKeychain,
)
// Same as crane, but override usage and keychain.
root := cmd.New(use, short, []crane.Option{crane.WithAuthFromKeychain(keychain)})
if err := root.ExecuteContext(ctx); err != nil {
cancel()
os.Exit(1)