Skip to content
This repository was archived by the owner on Feb 17, 2020. It is now read-only.

给帮助信息着色 #10

Open
guonaihong opened this issue Jun 21, 2019 · 0 comments
Open

给帮助信息着色 #10

guonaihong opened this issue Jun 21, 2019 · 0 comments
Labels

Comments

@guonaihong
Copy link
Owner

guonaihong commented Jun 21, 2019

这样可以提醒使用者,哪些选项是必须要写的
触发条件,某个选项设置打开了must函数,没有在命令行里填入该值又没有默信值的情况下,则标红该usage信息。伪代码如下

flag.Opt("i, int", "test int").Must().Var(&option.Int, 0)
@guonaihong guonaihong changed the title 给输出信息着色 给帮助信息着色 Jun 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant