diff --git a/CHANGELOG.md b/CHANGELOG.md index 101519b..97a7385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Changed - Pre-flight errors are now displayed also after the usage text to prevent the need to scroll through backlog. + - The `-w` flag now accepts comma delimited values in the form of `file1:W1,file2:W2`. - v1.1.0 - New diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 73997f1..ac9805a 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,4 +1,5 @@ # Contributors +* [AverageSecurityGuy](https://github.com/averagesecurityguy) * [bjhulst](https://github.com/bjhulst) * [bsysop](https://twitter.com/bsysop) * [ccsplit](https://github.com/ccsplit) diff --git a/main.go b/main.go index 9e5f60a..a4ee43a 100644 --- a/main.go +++ b/main.go @@ -58,7 +58,14 @@ func (m *multiStringFlag) String() string { } func (m *multiStringFlag) Set(value string) error { - *m = append(*m, value) + delimited := strings.Split(value, ",") + + if len(delimited) > 1 { + *m = append(*m, delimited...) + } else { + *m = append(*m, value) + } + return nil }