Exemplo n.º 1
0
Arquivo: cmd.go Projeto: hawx/xesende
func accountsCmd(client *xesende.Client) *hadfield.Command {
	return &hadfield.Command{
		Usage: "accounts",
		Short: "list accounts",
		Long: `
  List accounts available to the user.
`,
		Run: func(cmd *hadfield.Command, args []string) {
			resp, err := client.Accounts()
			if err != nil {
				log.Fatal(err)
			}

			pretty.PrettyPrint(resp.Accounts)
		},
	}
}