Skip to content

Commit

Permalink
Simplify isStandardFormat (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
n10v authored and nicksnyder committed May 12, 2017
1 parent f373441 commit 3e70a1a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions i18n/bundle/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ func parseTranslations(filename string, buf []byte) ([]translation.Translation,
func isStandardFormat(ext string, buf []byte) bool {
buf = deleteLeadingComments(ext, buf)
firstRune := rune(buf[0])
if (ext == ".json" && firstRune == '[') || (ext == ".yaml" && firstRune == '-') {
return true
}
return false
return (ext == ".json" && firstRune == '[') || (ext == ".yaml" && firstRune == '-')
}

// deleteLeadingComments deletes leading newlines and comments in buf.
Expand Down

0 comments on commit 3e70a1a

Please sign in to comment.