Skip to content

Commit

Permalink
added Network() for netip Addr to make it support the interface of ne…
Browse files Browse the repository at this point in the history
…t.Addr
  • Loading branch information
zhlsunshine committed Oct 17, 2022
1 parent 85b02de commit b2d44d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/net/netip/netip.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,9 @@ func (ip Addr) String() string {
}
}

// Network returns the address's network name, "addr.hi+addr.lo+ip-family-zone".
func (ip Addr) Network() string { return "ip.hi+ip.lo+ip-family-zone" }

// AppendTo appends a text encoding of ip,
// as generated by MarshalText,
// to b and returns the extended buffer.
Expand Down

0 comments on commit b2d44d4

Please sign in to comment.