File tree 3 files changed +6
-6
lines changed 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ func findNameserversForDomain(
409
409
}
410
410
411
411
// Check on-chain domains first
412
- for startLabelIdx := 0 ; startLabelIdx < len ( queryLabels ); startLabelIdx ++ {
412
+ for startLabelIdx := range queryLabels {
413
413
lookupDomainName := strings .Join (queryLabels [startLabelIdx :], "." )
414
414
// Convert to canonical form for consistency
415
415
lookupDomainName = dns .CanonicalName (lookupDomainName )
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ func (t *TextDomainRecord) decode(r *BytesReader) error {
246
246
return err
247
247
}
248
248
var size uint8
249
- for i := 0 ; i < int (length ); i ++ {
249
+ for range int (length ) {
250
250
// Read item size
251
251
if err := binary .Read (r , binary .LittleEndian , & size ); err != nil {
252
252
return err
@@ -297,7 +297,7 @@ func domainRecordNameDecode(r *BytesReader) (string, error) {
297
297
if c > DnsMaxLabel {
298
298
return "" , errors .New ("label too long" )
299
299
}
300
- for j := 0 ; j < int (c ); j ++ {
300
+ for range int (c ) {
301
301
b , err := r .ReadByte ()
302
302
if err != nil {
303
303
return "" , err
@@ -329,7 +329,7 @@ func domainRecordNameDecode(r *BytesReader) (string, error) {
329
329
data := r .OriginalBytes ()
330
330
r = NewBytesReader (data )
331
331
// Read and discard bytes until we reach the calculated offset
332
- for j := 0 ; j < offset ; j ++ {
332
+ for range offset {
333
333
if _ , err := r .ReadByte (); err != nil {
334
334
return "" , err
335
335
}
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ func (p *Proof) Decode(r *bytes.Buffer) error {
106
106
return err
107
107
}
108
108
p .Nodes = make ([]ProofNode , count )
109
- for i := 0 ; i < int (count ); i ++ {
109
+ for i := range int (count ) {
110
110
item := & ProofNode {}
111
111
if hasBit (bitMap , i ) {
112
112
bits , bytes , err := readBitlen (r )
@@ -279,7 +279,7 @@ func (p *Proof) has(
279
279
x := 0
280
280
y := depth
281
281
var c uint16
282
- for i := 0 ; i < int (tmpLen ); i ++ {
282
+ for range int (tmpLen ) {
283
283
if hasBit (prefix , int (x )) != hasBit (key , int (y )) {
284
284
break
285
285
}
You can’t perform that action at this time.
0 commit comments