MCPcopy Create free account
hub / github.com/Driver-C/tryssh / FindAlias

Function FindAlias

pkg/config/cache.go:34–45  ·  view source on GitHub ↗

FindAlias returns all server list entries that have the specified alias.

(alias string, conf *MainConfig)

Source from the content-addressed store, hash-verified

32
33// FindAlias returns all server list entries that have the specified alias.
34func FindAlias(alias string, conf *MainConfig) []ServerListConfig {
35 if alias == "" {
36 return nil
37 }
38 var result []ServerListConfig
39 for _, server := range conf.ServerLists {
40 if server.Alias == alias {
41 result = append(result, server)
42 }
43 }
44 return result
45}

Calls

no outgoing calls