fix: return supported values for flags when calling Values.Type()
Signed-off-by: Jesper Axelsen <jesperbaxelsen@gmail.com> Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
committed by
Matheus Pimenta
parent
b33f173670
commit
28f5b553a2
@@ -58,9 +58,13 @@ func (d *GitLabVisibility) Set(str string) error {
|
||||
}
|
||||
|
||||
func (d *GitLabVisibility) Type() string {
|
||||
return "gitLabVisibility"
|
||||
keys := make([]string, 0, len(supportedGitLabVisibilities))
|
||||
for v := range supportedGitLabVisibilities {
|
||||
keys = append(keys, string(v))
|
||||
}
|
||||
return strings.Join(keys, "|")
|
||||
}
|
||||
|
||||
func (d *GitLabVisibility) Description() string {
|
||||
return fmt.Sprintf("specifies the visibility of the repository. Valid values are public, private, internal")
|
||||
return "specifies the visibility of the repository"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user