Merge pull request #57 from moorereason/simplify

Fix a couple issues found by gosimple
This commit is contained in:
Thomas Pelletier
2016-04-19 09:41:51 +02:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -591,7 +591,7 @@ func (l *tomlLexer) run() {
}
func init() {
dateRegexp = regexp.MustCompile("^\\d{1,4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})")
dateRegexp = regexp.MustCompile(`^\d{1,4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})`)
}
// Entry point
+1 -1
View File
@@ -105,7 +105,7 @@ func (l *queryLexer) peek() rune {
}
func (l *queryLexer) accept(valid string) bool {
if strings.IndexRune(valid, l.next()) >= 0 {
if strings.ContainsRune(valid, l.next()) {
return true
}
l.backup()