Skip to content

Commit

Permalink
fix : just print warning when flagset is ComandLine
Browse files Browse the repository at this point in the history
  • Loading branch information
hui.wang committed Jan 7, 2022
1 parent ac8ecc8 commit 5dc30b9
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 31 deletions.
20 changes: 16 additions & 4 deletions gen_options_optiongen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions kv/gen_options_optiongen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions tests/gen_config_optiongen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 17 additions & 5 deletions tests/replit/config/gen_config_optiongen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions tests/replit/config/gen_etcd_optiongen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions tests/replit/config/gen_redis_optiongen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions xflag/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func (fm *Maker) ParseArgs(obj interface{}, args []string) ([]string, error) {
return fm.fs.Args(), err
}
func (fm *Maker) warningCanNotCreate(path string, typeStr string) {
if fm.cc.FlagSet != flag.CommandLine {
return
}
if containsString(fm.cc.FlagSetIgnore, path) {
return
}
Expand Down
20 changes: 16 additions & 4 deletions xflag/gen_options_optiongen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5dc30b9

Please sign in to comment.