Merge pull request #61 from vbatts/clearer_branch

tar: more clear `if` predicate
This commit is contained in:
Vincent Batts 2016-08-10 14:02:02 -04:00 committed by GitHub
commit d6b0881515

6
tar.go
View file

@ -51,12 +51,12 @@ func (ts *tarStream) readHeaders() {
notimekws := []string{} notimekws := []string{}
for _, kw := range ts.keywords { for _, kw := range ts.keywords {
if !inSlice(kw, notimekws) { if !inSlice(kw, notimekws) {
if kw != "time" { if kw == "time" {
notimekws = append(notimekws, kw)
} else {
if !inSlice("tar_time", ts.keywords) { if !inSlice("tar_time", ts.keywords) {
notimekws = append(notimekws, "tar_time") notimekws = append(notimekws, "tar_time")
} }
} else {
notimekws = append(notimekws, kw)
} }
} }
} }