net/packet: remove NewIP, offer only a netaddr constructor.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2020-11-10 21:58:09 -08:00
parent d7ee3096dd
commit c2cc3acbaf
4 changed files with 15 additions and 20 deletions

View File

@ -6,7 +6,6 @@ package packet
import (
"bytes"
"net"
"reflect"
"testing"
@ -31,7 +30,7 @@ func mustIP6(s string) IP6 {
func TestIP4String(t *testing.T) {
const str = "1.2.3.4"
ip := NewIP4(net.ParseIP(str))
ip := mustIP4(str)
var got string
allocs := testing.AllocsPerRun(1000, func() {