-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
improvementImprovement to an existing feature.Improvement to an existing feature.
Description
There are a few instances where the same code logic is being used but with different parameters. Building a function that takes parameters to be customized for each use case will limit repetitiveness.
Repeated function in question:
if len(args) == 3 && args[2] != "-h" && args[2] != "--help" {
errMsg := styling.ErrorColor.Render("Error!") +
"\nThe only available options after the\n" + commandName + " command are '-h' or '--help'"
return fmt.Errorf("%s", styling.ErrorBorder.Render(errMsg))
}Metadata
Metadata
Assignees
Labels
improvementImprovement to an existing feature.Improvement to an existing feature.
Projects
Status
Completed