1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-22 00:15:39 +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:
Stephen Chung 2016-07-15 09:59:18 -04:00
parent a29236e678
commit 992a4757b0

View file

@ -47,6 +47,9 @@ func main() {
// -k <keywords>
if *flUseKeywords != "" {
currentKeywords = splitKeywordsArg(*flUseKeywords)
if !inSlice("type", currentKeywords) {
currentKeywords = append([]string{"type"}, currentKeywords...)
}
} else {
currentKeywords = mtree.DefaultKeywords[:]
}