diff options
| author | therealmitchconnors <[email protected]> | 2019-09-10 09:27:08 -0700 |
|---|---|---|
| committer | therealmitchconnors <[email protected]> | 2019-09-10 09:27:08 -0700 |
| commit | 68f4136ecf4c77dccc4d7003f5020fafa4833534 (patch) | |
| tree | d9f7b314fa4b4ce37f3c24e43d2ac9c2e2bb9cc8 /flag.go | |
| parent | b22fc706c39eab8ef626dad18f21609425cc8714 (diff) | |
Add SliceValue Comments
Diffstat (limited to 'flag.go')
| -rw-r--r-- | flag.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -190,9 +190,15 @@ type Value interface { Type() string } +// SliceValue is a secondary interface to all flags which hold a list +// of values. This allows full control over the value of list flags, +// and avoids complicated marshalling and unmarshalling to csv. type SliceValue interface { + // Append adds the specified value to the end of the flag value list. Append(string) error + // Replace will fully overwrite any data currently in the flag value list. Replace([]string) error + // GetSlice returns the flag value list as an array of strings. GetSlice() []string } |
