Source file src/net/netip/export_test.go

     1  // Copyright 2021 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package netip
     6  
     7  import "internal/intern"
     8  
     9  var (
    10  	Z0    = z0
    11  	Z4    = z4
    12  	Z6noz = z6noz
    13  )
    14  
    15  type Uint128 = uint128
    16  
    17  func Mk128(hi, lo uint64) Uint128 {
    18  	return uint128{hi, lo}
    19  }
    20  
    21  func MkAddr(u Uint128, z *intern.Value) Addr {
    22  	return Addr{u, z}
    23  }
    24  
    25  func IPv4(a, b, c, d uint8) Addr { return AddrFrom4([4]byte{a, b, c, d}) }
    26  
    27  var TestAppendToMarshal = testAppendToMarshal
    28  
    29  func (a Addr) IsZero() bool   { return a.isZero() }
    30  func (p Prefix) IsZero() bool { return p.isZero() }
    31  

View as plain text