Closed chaozbj closed 4 years ago
/assign I agree with it and will update this example field to follow kn to keep the same user experience. I have a chore #40 PR WIP and will cover it. Thanks!
Merged @chaodaiG could you please help to close it? Thanks!
/close
@chaodaiG: Closing this issue.
When I read our codes, I found that we put the command examples in
cobra.Command.Long
fields, like this: https://github.com/knative/client-contrib/blob/f207c1f9a74266bebeb5a2a32f2a51cf8f9cd87f/plugins/admin/pkg/command/domain/set.go#L38Actually,
cobra.Command
has the field Example to set the command examples. I think we'd better use this field to describe our command examples. Like thekn
command did: https://github.com/knative/client/blob/3c5ceff655ec4543907a681c300912076fa49e53/pkg/kn/commands/route/list.go#L36If we use Example field, the output will look like:
@zhanggbj @ZhuangYuZY @lanceliuu @12345lcr How do you think if we use the field Example? Thanks!