func cliGet(cfg *arx.ClientConfig, args []string) { if len(args) != 1 { fmt.Println("Get requires one argument: <ident>.") os.Exit(1) } ident := args[0] secret, err := cfg.RequestSecret(ident) if err != nil { fmt.Println("Request failed.") fmt.Printf("\t%v\n", err) os.Exit(1) } fmt.Printf("Secret '%s': %X\n", ident, secret) os.Exit(0) }