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

Function assignAddGroupMemberOptions

cmd/flags_assigners.go:394–402  ·  view source on GitHub ↗

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

(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

392// If a flag's default value is not changed by the caller,
393// it's value will not be assigned to the associated gitlab.AddGroupMemberOptions field.
394func assignAddGroupMemberOptions(cmd *cobra.Command) (*gitlab.AddGroupMemberOptions, error) {
395 opts := new(gitlab.AddGroupMemberOptions)
396
397 opts.AccessLevel = gitlab.AccessLevel(getFlagAccessLevel(cmd, "access-level"))
398 if cmd.Flag("expires-at").Changed {
399 opts.ExpiresAt = gitlab.String(getFlagString(cmd, "expires-at"))
400 }
401 return opts, nil
402}
403
404// assignEditGroupMemberOptions assigns the flags' values to gitlab.EditGroupMemberOptions fields.
405// If a flag's default value is not changed by the caller,

Callers 1

runNewGroupMemberFunction · 0.85

Calls 2

getFlagAccessLevelFunction · 0.85
getFlagStringFunction · 0.85

Tested by

no test coverage detected