@@ -152,12 +152,9 @@ const (
152152)
153153
154154// Used in ZONEMD https://tools.ietf.org/html/rfc8976
155-
156155const (
157- // ZoneMD Accepted Schemes
158156 ZoneMDSchemeSimple = 1
159157
160- // ZoneMD Hash Algorithms
161158 ZoneMDHashAlgSHA384 = 1
162159 ZoneMDHashAlgSHA512 = 2
163160)
@@ -1416,13 +1413,13 @@ func (rr *APL) String() string {
14161413}
14171414
14181415// str returns presentation form of the APL prefix.
1419- func (p * APLPrefix ) str () string {
1416+ func (a * APLPrefix ) str () string {
14201417 var sb strings.Builder
1421- if p .Negation {
1418+ if a .Negation {
14221419 sb .WriteByte ('!' )
14231420 }
14241421
1425- switch len (p .Network .IP ) {
1422+ switch len (a .Network .IP ) {
14261423 case net .IPv4len :
14271424 sb .WriteByte ('1' )
14281425 case net .IPv6len :
@@ -1431,20 +1428,20 @@ func (p *APLPrefix) str() string {
14311428
14321429 sb .WriteByte (':' )
14331430
1434- switch len (p .Network .IP ) {
1431+ switch len (a .Network .IP ) {
14351432 case net .IPv4len :
1436- sb .WriteString (p .Network .IP .String ())
1433+ sb .WriteString (a .Network .IP .String ())
14371434 case net .IPv6len :
14381435 // add prefix for IPv4-mapped IPv6
1439- if v4 := p .Network .IP .To4 (); v4 != nil {
1436+ if v4 := a .Network .IP .To4 (); v4 != nil {
14401437 sb .WriteString ("::ffff:" )
14411438 }
1442- sb .WriteString (p .Network .IP .String ())
1439+ sb .WriteString (a .Network .IP .String ())
14431440 }
14441441
14451442 sb .WriteByte ('/' )
14461443
1447- prefix , _ := p .Network .Mask .Size ()
1444+ prefix , _ := a .Network .Mask .Size ()
14481445 sb .WriteString (strconv .Itoa (prefix ))
14491446
14501447 return sb .String ()
@@ -1458,17 +1455,17 @@ func (a *APLPrefix) equals(b *APLPrefix) bool {
14581455}
14591456
14601457// copy returns a copy of the APL prefix.
1461- func (p * APLPrefix ) copy () APLPrefix {
1458+ func (a * APLPrefix ) copy () APLPrefix {
14621459 return APLPrefix {
1463- Negation : p .Negation ,
1464- Network : copyNet (p .Network ),
1460+ Negation : a .Negation ,
1461+ Network : copyNet (a .Network ),
14651462 }
14661463}
14671464
14681465// len returns size of the prefix in wire format.
1469- func (p * APLPrefix ) len () int {
1466+ func (a * APLPrefix ) len () int {
14701467 // 4-byte header and the network address prefix (see Section 4 of RFC 3123)
1471- prefix , _ := p .Network .Mask .Size ()
1468+ prefix , _ := a .Network .Mask .Size ()
14721469 return 4 + (prefix + 7 )/ 8
14731470}
14741471
0 commit comments