MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / parseSSHConfigLine

Function parseSSHConfigLine

agent/app/service/ssh.go:937–944  ·  view source on GitHub ↗
(line string)

Source from the content-addressed store, hash-verified

935}
936
937func parseSSHConfigLine(line string) (string, string, bool) {
938 line = trimSSHInlineComment(line)
939 fields := strings.Fields(line)
940 if len(fields) < 2 {
941 return "", "", false
942 }
943 return fields[0], strings.Join(fields[1:], " "), true
944}
945
946func trimSSHInlineComment(line string) string {
947 inQuote := false

Callers 2

parseSSHConfigFileFunction · 0.85

Calls 1

trimSSHInlineCommentFunction · 0.85

Tested by

no test coverage detected