update print message in whoami

This commit is contained in:
Dan Anglin 2024-05-23 17:11:51 +01:00
parent 8ae4085d84
commit e7f857cf4f
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638

View file

@ -14,14 +14,14 @@ type WhoAmIExecutor struct {
} }
func NewWhoAmIExecutor(tlf TopLevelFlags, name, summary string) *WhoAmIExecutor { func NewWhoAmIExecutor(tlf TopLevelFlags, name, summary string) *WhoAmIExecutor {
command := WhoAmIExecutor{ whoExe := WhoAmIExecutor{
FlagSet: flag.NewFlagSet(name, flag.ExitOnError), FlagSet: flag.NewFlagSet(name, flag.ExitOnError),
topLevelFlags: tlf, topLevelFlags: tlf,
} }
command.Usage = commandUsageFunc(name, summary, command.FlagSet) whoExe.Usage = commandUsageFunc(name, summary, whoExe.FlagSet)
return &command return &whoExe
} }
func (c *WhoAmIExecutor) Execute() error { func (c *WhoAmIExecutor) Execute() error {
@ -30,7 +30,7 @@ func (c *WhoAmIExecutor) Execute() error {
return fmt.Errorf("unable to load the credential config; %w", err) return fmt.Errorf("unable to load the credential config; %w", err)
} }
fmt.Printf("You are %s\n", config.CurrentAccount) fmt.Printf("You are logged in as %q.\n", config.CurrentAccount)
return nil return nil
} }