MCPcopy Create free account
hub / github.com/Mister-leo/fssh / LoadHosts

Function LoadHosts

internal/sshconfig/sshconfig.go:16–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16func 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
25func LoadHostInfos() ([]HostInfo, error) {
26 home, err := os.UserHomeDir()

Callers

nothing calls this directly

Calls 1

LoadHostInfosFunction · 0.85

Tested by

no test coverage detected