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

Function loadSSHInsertIndex

agent/app/service/ssh.go:1130–1138  ·  view source on GitHub ↗
(lines []string)

Source from the content-addressed store, hash-verified

1128}
1129
1130func loadSSHInsertIndex(lines []string) int {
1131 for index, line := range lines {
1132 trimmed := strings.TrimSpace(line)
1133 if strings.HasPrefix(strings.ToLower(trimmed), "match ") {
1134 return index
1135 }
1136 }
1137 return len(lines)
1138}
1139
1140func ensureSSHManagedMarker(lines []string) ([]string, int) {
1141 for index, line := range lines {

Callers 1

ensureSSHManagedMarkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected