-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
refactorRefactoring existing code.Refactoring existing code.
Description
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
}Metadata
Metadata
Assignees
Labels
refactorRefactoring existing code.Refactoring existing code.
Projects
Status
Completed