Actually use strings.HasPrefix correctly

This commit is contained in:
Miek Gieben 2012-07-11 11:09:52 +02:00
parent 722460f52d
commit 24bc5b8041
1 changed files with 2 additions and 2 deletions

View File

@ -496,7 +496,7 @@ func zlexer(s *scan, c chan lex) {
l.torc = t
rrtype = true
} else {
if strings.HasPrefix("TYPE", l.token) {
if strings.HasPrefix(l.token, "TYPE") {
if t, ok := typeToInt(l.token); !ok {
l.token = "unknown RR type"
l.err = true
@ -512,7 +512,7 @@ func zlexer(s *scan, c chan lex) {
l.value = _CLASS
l.torc = t
} else {
if strings.HasPrefix("CLASS", l.token) {
if strings.HasPrefix(l.token, "CLASS") {
if t, ok := classToInt(l.token); !ok {
l.token = "unknown class"
l.err = true