The manual check for a -h | --help flag is repeated throughout several commands in the project:
if len(os.Args) == 3 && (os.Args[2] == "-h" || os.Args[2] == "--help") {
flag.Usage()
return output.String(), nil
}
A reusable function will be created in cmd/utils/:
if utils.CheckHelpFlag(&output, flag.Usage) {
return output.String(), nil
}
The manual check for a
-h | --helpflag is repeated throughout several commands in the project:A reusable function will be created in
cmd/utils/: