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
|
l.torc = t
|
||||||
rrtype = true
|
rrtype = true
|
||||||
} else {
|
} else {
|
||||||
if strings.HasPrefix("TYPE", l.token) {
|
if strings.HasPrefix(l.token, "TYPE") {
|
||||||
if t, ok := typeToInt(l.token); !ok {
|
if t, ok := typeToInt(l.token); !ok {
|
||||||
l.token = "unknown RR type"
|
l.token = "unknown RR type"
|
||||||
l.err = true
|
l.err = true
|
||||||
|
@ -512,7 +512,7 @@ func zlexer(s *scan, c chan lex) {
|
||||||
l.value = _CLASS
|
l.value = _CLASS
|
||||||
l.torc = t
|
l.torc = t
|
||||||
} else {
|
} else {
|
||||||
if strings.HasPrefix("CLASS", l.token) {
|
if strings.HasPrefix(l.token, "CLASS") {
|
||||||
if t, ok := classToInt(l.token); !ok {
|
if t, ok := classToInt(l.token); !ok {
|
||||||
l.token = "unknown class"
|
l.token = "unknown class"
|
||||||
l.err = true
|
l.err = true
|
||||||
|
|
Loading…
Reference in New Issue