Small doc updates
This commit is contained in:
parent
d7ca9f827c
commit
58c5f4cf6e
2
msg.go
2
msg.go
|
@ -237,7 +237,7 @@ var RcodeToString = map[int]string{
|
|||
// PackDomainName packs a domain name s into msg[off:].
|
||||
// If compression is wanted compress must be true and the compression
|
||||
// map needs to hold a mapping between domain names and offsets
|
||||
// pointing into msg[].
|
||||
// pointing into msg.
|
||||
func PackDomainName(s string, msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) {
|
||||
off1, _, err = packDomainName(s, msg, off, compression, compress)
|
||||
return
|
||||
|
|
6
zscan.go
6
zscan.go
|
@ -131,11 +131,11 @@ func ReadRR(q io.Reader, filename string) (RR, error) {
|
|||
return r.RR, nil
|
||||
}
|
||||
|
||||
// ParseZone reads a RFC 1035 style one from r. It returns *Tokens on the
|
||||
// ParseZone reads a RFC 1035 style zonefile from r. It returns *Tokens on the
|
||||
// returned channel, which consist out the parsed RR, a potential comment 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 directives $INCLUDE, $ORIGIN, $TTL and $GENERATE are supported.
|
||||
// The channel t is closed by ParseZone when the end of r is reached.
|
||||
//
|
||||
|
@ -152,7 +152,7 @@ func ReadRR(q io.Reader, filename string) (RR, error) {
|
|||
//
|
||||
// foo. IN A 10.0.0.1 ; this is a comment
|
||||
//
|
||||
// The text "; this is comment" is returned in Token.Comment . Comments inside the
|
||||
// The text "; this is comment" is returned in Token.Comment. Comments inside the
|
||||
// RR are discarded. Comments on a line by themselves are discarded too.
|
||||
func ParseZone(r io.Reader, origin, file string) chan *Token {
|
||||
return parseZoneHelper(r, origin, file, 10000)
|
||||
|
|
Loading…
Reference in New Issue