INNER CODE UNIT · Go
configuredHosts
eko/monday · cmd/clean.go:109
func configuredHosts() (hostfile.Hostfile, []string, error) {
conf, err := config.Load()
if err != nil {
return nil, nil, fmt.Errorf(
"unable to load the configuration, the hosts file entries are skipped: %s",
strings.Split(err.Error(), "\n")[0],
)
}
hosts, err := hostfile.NewClient()
if err != nil {
return nil, nil, fmt.Errorf("unable to open the hosts file, its entries are skipped: %v", err)
}
return hosts, conf.Hostnames(), nil
}