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

Function buildSSHDirectiveLines

agent/app/service/ssh.go:1064–1072  ·  view source on GitHub ↗
(key, value string)

Source from the content-addressed store, hash-verified

1062}
1063
1064func buildSSHDirectiveLines(key, value string) []string {
1065 var directives []string
1066 for _, item := range strings.Split(value, ",") {
1067 if item != "" {
1068 directives = append(directives, fmt.Sprintf("%s %s", key, item))
1069 }
1070 }
1071 return directives
1072}
1073
1074func rewriteSSHManagedDirectives(fileName, key string, newDirectives []string) error {
1075 content, err := os.ReadFile(fileName)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected