INNER CODE UNIT · Go

newLines

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

		newLines = append(newLines, lines[pos:s.start+1]...)

		s2 := getHelpSection(s.command, s.section)

		if s.code {
			newLines = append(newLines, "```")
		}
		newLines = append(newLines, s2...)
		if s.code {
			newLines = append(newLines, "```")
		}

		newLines = append(newLines, lines[s.end])
		pos = s.end + 1
	}

	if !reflect.DeepEqual(lines, newLines) {
		err = ioutil.WriteFile(path, []byte(strings.Join(newLines, "\n")), 0o600)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…