(key, value string)
| 1062 | } |
| 1063 | |
| 1064 | func 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 | |
| 1074 | func rewriteSSHManagedDirectives(fileName, key string, newDirectives []string) error { |
| 1075 | content, err := os.ReadFile(fileName) |
no outgoing calls
no test coverage detected