github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/pkg/net/proxy/tun/gvisor/tun_test.go (about) 1 package tun 2 3 import ( 4 "net" 5 "testing" 6 ) 7 8 func TestInterfaces(t *testing.T) { 9 z := make([][]byte, 100) 10 z = z[:0] 11 12 z = append(z, []byte("ddd")) 13 14 t.Log(z) 15 16 i := 0 17 for ; i < 10; i++ { 18 t.Log(i) 19 } 20 21 is, err := net.Interfaces() 22 if err != nil { 23 t.Fatal(err) 24 } 25 26 t.Log(is) 27 28 for _, i := range is { 29 t.Log(i.Name) 30 } 31 }