mirror of
https://github.com/vbatts/tar-split.git
synced 2024-11-16 05:18:38 +00:00
main: don't dupliate keywords
When adding keywords with -K, we don't want to duplicate keywords in the keywords slice. Signed-off-by: Stephen Chung <schung@redhat.com>
This commit is contained in:
parent
c74c2ed6d7
commit
843517f136
1 changed files with 5 additions and 1 deletions
|
@ -102,7 +102,11 @@ func main() {
|
|||
}
|
||||
// -K <keywords>
|
||||
if *flAddKeywords != "" {
|
||||
currentKeywords = append(currentKeywords, splitKeywordsArg(*flAddKeywords)...)
|
||||
for _, kw := range splitKeywordsArg(*flAddKeywords) {
|
||||
if !inSlice(kw, currentKeywords) {
|
||||
currentKeywords = append(currentKeywords, kw)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -f <file>
|
||||
|
|
Loading…
Reference in a new issue