MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / extractAppliedPlan

Function extractAppliedPlan

internal/ui/plugins/ansible/plugin.go:2053–2063  ·  view source on GitHub ↗
(output string)

Source from the content-addressed store, hash-verified

2051}
2052
2053func extractAppliedPlan(output string) string {
2054 lines := strings.Split(strings.TrimSpace(output), "\n")
2055 applied := make([]string, 0, len(lines))
2056 for _, line := range lines {
2057 trimmed := strings.TrimSpace(line)
2058 if strings.HasPrefix(trimmed, "applied_") {
2059 applied = append(applied, trimmed)
2060 }
2061 }
2062 return strings.Join(applied, ", ")
2063}
2064
2065func shellSingleQuote(s string) string {
2066 return "'" + strings.ReplaceAll(s, "'", `'"'"'`) + "'"

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected