1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-10-04 20:31:02 +00:00

*: have gomtree always evaluate tar_time if it is present

if the keyword "tar_time" is present when evaluating
an Entry, gomtree should use the tar_time when evaluating
the "time" keyword as well. This commit also adds a test that
makes sure "tar_time" wins against "time" if both are present.
Some minor clean-ups as well, such as checking if KeywordFunc[keyword]
actually retrieves a function.

Signed-off-by: Stephen Chung <schung@redhat.com>
This commit is contained in:
Stephen Chung 2016-07-22 18:01:54 -04:00
parent 9cee264f23
commit d1aa217f2e
6 changed files with 102 additions and 14 deletions

View file

@ -54,7 +54,11 @@ func main() {
currentKeywords = append([]string{"type"}, currentKeywords...)
}
} else {
currentKeywords = mtree.DefaultKeywords[:]
if *flTar != "" {
currentKeywords = mtree.DefaultTarKeywords[:]
} else {
currentKeywords = mtree.DefaultKeywords[:]
}
}
// -K <keywords>
if *flAddKeywords != "" {