Actually use strings.HasPrefix correctly
This commit is contained in:
parent
722460f52d
commit
24bc5b8041
4
zscan.go
4
zscan.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue