mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-22 08:25:38 +00:00
main: 'type' keyword should always be evaluated
Resolves #21. When using `-k` option, gomtree should use only the keywords specified by the user, as well as the 'type' keyword if it wasn't specified. Signed-off-by: Stephen Chung <schung@redhat.com>
This commit is contained in:
parent
a29236e678
commit
992a4757b0
1 changed files with 3 additions and 0 deletions
|
@ -47,6 +47,9 @@ func main() {
|
||||||
// -k <keywords>
|
// -k <keywords>
|
||||||
if *flUseKeywords != "" {
|
if *flUseKeywords != "" {
|
||||||
currentKeywords = splitKeywordsArg(*flUseKeywords)
|
currentKeywords = splitKeywordsArg(*flUseKeywords)
|
||||||
|
if !inSlice("type", currentKeywords) {
|
||||||
|
currentKeywords = append([]string{"type"}, currentKeywords...)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
currentKeywords = mtree.DefaultKeywords[:]
|
currentKeywords = mtree.DefaultKeywords[:]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue