diff --git a/rawmsg.go b/rawmsg.go index d18305c8..16f2edd8 100644 --- a/rawmsg.go +++ b/rawmsg.go @@ -4,6 +4,9 @@ package dns +// These Raw* functions do not use reflection, they directly set the values +// in the buffer. There are faster than their reflection counterparts. + // RawSetId sets the message id in buf. func RawSetId(msg []byte, i uint16) { msg[0], msg[1] = packUint16(i) diff --git a/zscan.go b/zscan.go index ff8d54dc..06d5ba92 100644 --- a/zscan.go +++ b/zscan.go @@ -79,7 +79,7 @@ type lex struct { err bool // When true, token text has lexer error value uint8 // Value: _STRING, _BLANK, etc. line int // Line in the file - column int // Column in the fil + column int // Column in the file torc uint16 // Type or class as parsed in the lexer, we only need to look this up in the grammar } @@ -113,7 +113,7 @@ func ReadRR(q io.Reader, filename string) (RR, error) { // returned channel, which consist out the parsed RR or an error. // If there is an error the RR is nil. The string file is only used // in error reporting. The string origin is used as the initial origin, as -// if the file would start with: $ORIGIN origin +// if the file would start with: $ORIGIN origin . // The channel t is closed by ParseZone when the end of r is reached. func ParseZone(r io.Reader, origin, file string) chan Token { t := make(chan Token)