-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: centralize addition of flags to remove inconsistencies
Signed-off-by: Dustin Scott <[email protected]>
- Loading branch information
Showing
9 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2024 Nukleros | ||
// SPDX-License-Identifier: MIT | ||
|
||
package license | ||
|
||
import "github.com/spf13/pflag" | ||
|
||
// AddFlags adds a consistent set of license flags across plugin versions and commands. | ||
func AddFlags(fs *pflag.FlagSet, projectLicensePath, sourceHeaderPath *string) { | ||
fs.StringVar(projectLicensePath, "project-license", "", "path to project license file") | ||
fs.StringVar(sourceHeaderPath, "source-header-license", "", "path to file with source code header license text") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2024 Nukleros | ||
// SPDX-License-Identifier: MIT | ||
|
||
package workload | ||
|
||
import "github.com/spf13/pflag" | ||
|
||
// AddFlags adds a consistent set of workload flags across plugin versions and commands. | ||
func AddFlags(fs *pflag.FlagSet, workloadConfigPath *string, enableOlm *bool) { | ||
fs.StringVar(workloadConfigPath, "workload-config", "", "path to workload config file") | ||
fs.BoolVar(enableOlm, "enable-olm", false, "enable support for OpenShift Lifecycle Manager") | ||
} |