INNER CODE UNIT · Go

findNextSection

kluctl/kluctl · internal/replace-commands-help/main.go:95

func findNextSection(lines []string, start int) *section {

	for i := start; i < len(lines); i++ {
		m := beginPattern.FindSubmatch([]byte(lines[i]))
		if m == nil {
			continue
		}

		var s section
		s.start = i
		s.command = string(m[1])
		s.section = string(m[2])
		s.code = string(m[3]) == "true"

		for j := i + 1; j < len(lines); j++ {
			m = endPattern.FindSubmatch([]byte(lines[j]))
			if m == nil {
				continue

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…