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

Function ensureSSHManagedMarker

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

Source from the content-addressed store, hash-verified

1138}
1139
1140func ensureSSHManagedMarker(lines []string) ([]string, int) {
1141 for index, line := range lines {
1142 if strings.TrimSpace(line) == sshManagedMarker {
1143 return lines, index + 1
1144 }
1145 }
1146 insertAt := loadSSHInsertIndex(lines)
1147 lines = insertSSHDirectivesAt(lines, insertAt, []string{sshManagedMarker})
1148 return lines, insertAt + 1
1149}
1150
1151func loadSSHManagedBlock(lines []string) (sshManagedBlock, bool) {
1152 for index, line := range lines {

Callers 1

Calls 2

loadSSHInsertIndexFunction · 0.85
insertSSHDirectivesAtFunction · 0.85

Tested by

no test coverage detected