Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add EnumSliceVar flag #128

Merged
merged 2 commits into from
Aug 7, 2023
Merged

add EnumSliceVar flag #128

merged 2 commits into from
Aug 7, 2023

Conversation

dogancanbakir
Copy link
Member

@dogancanbakir dogancanbakir commented Aug 4, 2023

Closes #127.

Note: I didn't want to introduce any changes that would break the EnumVar API. We can merge those changes in the future.

Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm !

$ ./basic -h severity


Usage:
  ./basic [flags]

Flags:
   -s, -severity value  severity of the scan (default high)
$ ./basic -s high,low
Got Severity: [high low]

Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

I'm thinking if it makes sense to make the split/join placeholder configurable for example via callbacks, for example:

type SplitFunc func(s string) []string
type JoinFunc func(s []string) string

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Aug 7, 2023
@Mzack9999 Mzack9999 merged commit 52e9253 into main Aug 7, 2023
2 checks passed
@Mzack9999 Mzack9999 deleted the add_enumslicevar_flag branch August 7, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EnumSlice Type Flag: support multi enum
3 participants