aboutsummaryrefslogtreecommitdiff
path: root/flag.go
diff options
context:
space:
mode:
authortherealmitchconnors <[email protected]>2019-08-16 12:07:51 -0700
committertherealmitchconnors <[email protected]>2019-08-16 12:07:51 -0700
commitc6c0f0fd30b9b96d1c9a1cbf90799706bd501458 (patch)
treeefaa9517c592bcb7b84bca3676e8437d160cf43f /flag.go
parent24fa6976df40757dce6aea913e7b81ade90530e1 (diff)
Add first SliceValue implementations
Diffstat (limited to 'flag.go')
-rw-r--r--flag.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/flag.go b/flag.go
index 9beeda8..60c2038 100644
--- a/flag.go
+++ b/flag.go
@@ -190,6 +190,12 @@ type Value interface {
Type() string
}
+type SliceValue interface {
+ Append(string) error
+ Replace([]string) error
+ GetSlice() []string
+}
+
// sortFlags returns the flags as a slice in lexicographical sorted order.
func sortFlags(flags map[NormalizedName]*Flag) []*Flag {
list := make(sort.StringSlice, len(flags))