|
@ -20,6 +20,7 @@ func Args() *console.Command { |
|
|
option.String("bar", "required bar option", option.Required, option.Short('b')), |
|
|
option.String("bar", "required bar option", option.Required, option.Short('b')), |
|
|
option.String("cat", "cat option", option.Short('c')), |
|
|
option.String("cat", "cat option", option.Short('c')), |
|
|
option.Time("time", "time example"), |
|
|
option.Time("time", "time example"), |
|
|
|
|
|
option.Time("hidden", "hidden time example", option.Hidden), |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
return nil |
|
|
return nil |
|
@ -29,6 +30,7 @@ func Args() *console.Command { |
|
|
out.Println(ctx, "bar: <info>", in.Option(ctx, "bar").String(), "</info>") |
|
|
out.Println(ctx, "bar: <info>", in.Option(ctx, "bar").String(), "</info>") |
|
|
out.Println(ctx, "cat: <info>", in.Option(ctx, "cat").String(), "</info>") |
|
|
out.Println(ctx, "cat: <info>", in.Option(ctx, "cat").String(), "</info>") |
|
|
out.Println(ctx, "time: <info>", in.Option(ctx, "time").Time().Format(time.RFC3339), "</info>") |
|
|
out.Println(ctx, "time: <info>", in.Option(ctx, "time").Time().Format(time.RFC3339), "</info>") |
|
|
|
|
|
out.Println(ctx, "hidden: <info>", in.Option(ctx, "hidden").Time().Format(time.RFC3339), "</info>") |
|
|
|
|
|
|
|
|
return nil |
|
|
return nil |
|
|
}, |
|
|
}, |
|
|