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

Function assignEditGroupMemberOptions

cmd/flags_assigners.go:407–415  ·  view source on GitHub ↗

assignEditGroupMemberOptions assigns the flags' values to gitlab.EditGroupMemberOptions fields. If a flag's default value is not changed by the caller, it's value will not be assigned to the associated gitlab.EditGroupMemberOptions field.

(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

405// If a flag's default value is not changed by the caller,
406// it's value will not be assigned to the associated gitlab.EditGroupMemberOptions field.
407func assignEditGroupMemberOptions(cmd *cobra.Command) (*gitlab.EditGroupMemberOptions, error) {
408 opts := new(gitlab.EditGroupMemberOptions)
409
410 opts.AccessLevel = gitlab.AccessLevel(getFlagAccessLevel(cmd, "access-level"))
411 if cmd.Flag("expires-at").Changed {
412 opts.ExpiresAt = gitlab.String(getFlagString(cmd, "expires-at"))
413 }
414 return opts, nil
415}
416
417// assignEditProjectMemberOptions assigns the flags' values to gitlab.EditProjectMemberOptions fields.
418// If a flag's default value is not changed by the caller,

Callers 1

runEditGroupMemberFunction · 0.85

Calls 2

getFlagAccessLevelFunction · 0.85
getFlagStringFunction · 0.85

Tested by

no test coverage detected