Merge pull request #57 from moorereason/simplify
Fix a couple issues found by gosimple
This commit is contained in:
@@ -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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user