MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / resolveSSHUser

Function resolveSSHUser

internal/ui/plugins/communityscripts/plugin.go:125–137  ·  view source on GitHub ↗

resolveSSHUser determines the SSH user for a node, preferring the node's source profile when present.

(app *components.App, node *api.Node)

Source from the content-addressed store, hash-verified

123
124// resolveSSHUser determines the SSH user for a node, preferring the node's source profile when present.
125func resolveSSHUser(app *components.App, node *api.Node) string {
126 cfg := app.Config()
127 if cfg == nil {
128 return ""
129 }
130
131 sourceProfile := ""
132 if node != nil {
133 sourceProfile = node.SourceProfile
134 }
135
136 return cfg.ResolveSSHSettings(sourceProfile).SSHUser
137}

Callers 2

openSelectorMethod · 0.70
openSelectorForLXCMethod · 0.70

Calls 2

ConfigMethod · 0.80
ResolveSSHSettingsMethod · 0.80

Tested by

no test coverage detected