Skip to content

Commit

Permalink
all: upd go
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Oct 21, 2022
1 parent 01a14de commit ca87773
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yaml
Expand Up @@ -13,9 +13,9 @@
- 'ubuntu-latest'
'steps':
- 'uses': 'actions/checkout@master'
- 'uses': 'actions/setup-go@v2'
- 'uses': 'actions/setup-go@v3'
'with':
'go-version': '1.17.x'
'go-version': '1.18.x'
- 'name': 'tests'
'run': 'make test'
- 'name': 'coverage'
Expand Down
2 changes: 1 addition & 1 deletion bamboo-specs/bamboo.yaml
Expand Up @@ -5,7 +5,7 @@
'key': 'GOLIBSSPECS'
'name': 'golibs'
'variables':
'dockerGo': 'adguard/golang-ubuntu:4.3'
'dockerGo': 'adguard/golang-ubuntu:5.2'

'stages':
-
Expand Down
5 changes: 2 additions & 3 deletions netutil/addrconv.go
Expand Up @@ -6,11 +6,10 @@ import (
"net/netip"
)

// IPv4Localhost returns 127.0.0.1, which returns true for [netip.Addr.Is4].
// IPv4Unspecified returns the IPv4 unspecified address "0.0.0.0".
// IPv4Localhost returns the IPv4 localhost address "127.0.0.1".
func IPv4Localhost() (ip netip.Addr) { return netip.AddrFrom4([4]byte{127, 0, 0, 1}) }

// IPv6Localhost returns ::1, which returns true for [netip.Addr.Is6].
// IPv6Localhost returns the IPv6 localhost address "::1".
func IPv6Localhost() (ip netip.Addr) { return netip.AddrFrom16([16]byte{15: 1}) }

// ZeroPrefix returns an IP subnet with prefix 0 and all bytes of the IP address
Expand Down
2 changes: 2 additions & 0 deletions netutil/ipmap.go
Expand Up @@ -25,6 +25,8 @@ func ipToArr(ip net.IP) (a ipArr) {
}

// IPMap is a map of IP addresses.
//
// Deprecated: Use map[netip.Addr]T instead.
type IPMap struct {
m map[ipArr]interface{}
}
Expand Down

0 comments on commit ca87773

Please sign in to comment.