func copyServices(srv []service) []service {
	cpy := make([]service, len(srv))
	copy(cpy, srv)
	return cpy
}
copyServices returns a slice backed by a new array which is a copy of srv,
note that only a shallow copy is performed.
package main
type resolver interface {
	resolve(name string) (srv []service, err error)
}
type resolverFunc func(string) ([]service, error)
func (f resolverFunc) resolve(name string) ([]service, error) {
	return f(name)
}
type service struct {
	host string
	port int
	tags []string
}