56 hosts[i], _ = netselect.NewHost(h, h)
57 }
58
59 selector, err := netselect.NewNetSelector(hosts[:]) 60 if err != nil {
61 fmt.Println("Error ", err)
62 return err
If a value is of type slice already, it need not be converted to slice again.
f(s[:]) // s is string
copy(b[:], values...) // b is []byte
f(s)
copy(b, values...)