mirror of
https://github.com/vbatts/tar-split.git
synced 2024-11-16 21:38:38 +00:00
Merge pull request #39 from stephen679/no_duplicate_keywords
main: don't dupliate keywords
This commit is contained in:
commit
e31036f7e3
1 changed files with 5 additions and 1 deletions
|
@ -102,7 +102,11 @@ func main() {
|
||||||
}
|
}
|
||||||
// -K <keywords>
|
// -K <keywords>
|
||||||
if *flAddKeywords != "" {
|
if *flAddKeywords != "" {
|
||||||
currentKeywords = append(currentKeywords, splitKeywordsArg(*flAddKeywords)...)
|
for _, kw := range splitKeywordsArg(*flAddKeywords) {
|
||||||
|
if !inSlice(kw, currentKeywords) {
|
||||||
|
currentKeywords = append(currentKeywords, kw)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -f <file>
|
// -f <file>
|
||||||
|
|
Loading…
Reference in a new issue