MCPcopy Index your code
hub / github.com/devopsctl/gitlabctl / validateFromGroupAndProjectFlags

Function validateFromGroupAndProjectFlags

cmd/flags_definers.go:258–268  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

256}
257
258func validateFromGroupAndProjectFlags(cmd *cobra.Command) error {
259 if getFlagString(cmd, "from-group") != "" &&
260 getFlagString(cmd, "from-project") != "" {
261 return newUsedTooManyFlagError("from-group", "from-project")
262 }
263 if getFlagString(cmd, "from-group") == "" &&
264 getFlagString(cmd, "from-project") == "" {
265 return newSetAtLeastOneFlagError("from-group", "from-project")
266 }
267 return nil
268}
269
270func validateFromProjectFlag(cmd *cobra.Command) error {
271 if getFlagString(cmd, "from-project") == "" {

Callers 5

edit_member.goFile · 0.85
delete_member.goFile · 0.85
new_member.goFile · 0.85
get_members.goFile · 0.85
desc_member.goFile · 0.85

Calls 3

getFlagStringFunction · 0.85
newUsedTooManyFlagErrorFunction · 0.85

Tested by

no test coverage detected