You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: config.go
    path of file: ./repos/cadence/common/peerprovider/ringpopprovider
    
    the code of the file until where you have to start completion: // Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PA
    
func (provider *dnsSRVProvider) Hosts() ([]string, error) {
	var results []string
	resolvedHosts := map[string][]string{}

	for _, host := range provider.UnresolvedHosts {
		hostParts := strings.Split(host, ".")
		if len(hostParts) <= 2 {
			return nil, fmt.Errorf("could not seperate host from domain %q", host)
		}
		serviceName := hostParts[0]
		domain := strings.Join(hostParts[1:], ".")
		resolved, exists := resolvedHosts[serviceName]
		if !exists {
			_, srvs, err := provider.Resolver.LookupSRV(context.Background(), serviceName, "tcp", domain)

			if err != nil {
				return nil, fmt.Errorf("could not resolve host: %s.%s", serviceName, domain)
			}

			var targets []string
			for _, s := range srvs {
				addrs, err := provider.Resolver.LookupHost(context.Background(), s.Target)

				if err != nil {
					provider.Logger.Warn("could not resolve srv dns host", tag.Address(s.Target), tag.Error(err))
					continue
				}
				for _, a := range addrs {
					targets = append(targets, net.JoinHostPort(a, fmt.Sprintf("%d", s.Port)))
				}
			}
			resolvedHosts[serviceName] = targets
			resolved = targets
		}

		results = append(results, resolved...)
	}

	if len(results) == 0 {
		return nil, errors.New("no hosts found, and bootstrap requires at least one")
	}
	return results, nil
}