INNER CODE UNIT · Go
countIndent
kluctl/kluctl · internal/replace-commands-help/main.go:121
func countIndent(str string) int {
for i := 0; i < len(str); i++ {
if str[i] != ' ' {
return i
}
}
return 0
}
func getHelpSection(command string, section string) []string {
log.Printf("Getting section '%s' from command '%s'", section, command)
exe, err := os.Executable()
if err != nil {
log.Fatal(err)
}
args := strings.Split(command, " ")