()
| 14 | } |
| 15 | |
| 16 | func LoadHosts() ([]string, error) { |
| 17 | infos, err := LoadHostInfos() |
| 18 | if err != nil { return nil, err } |
| 19 | hosts := make([]string, 0, len(infos)) |
| 20 | for _, hi := range infos { hosts = append(hosts, hi.Name) } |
| 21 | sort.Strings(hosts) |
| 22 | return hosts, nil |
| 23 | } |
| 24 | |
| 25 | func LoadHostInfos() ([]HostInfo, error) { |
| 26 | home, err := os.UserHomeDir() |
nothing calls this directly
no test coverage detected