const maxInt … // Doc returns un-indented string as here-document. func Doc(raw string) string { … } // getMinIndent calculates the minimum indentation in lines, excluding empty lines. func getMinIndent(lines []string, skipFirstLine bool) int { … } // removeIndentation removes n characters from the front of each line in lines. // Skips first line if skipFirstLine is true, skips empty lines. func removeIndentation(lines []string, n int, skipFirstLine bool) []string { … } // Docf returns unindented and formatted string as here-document. // Formatting is done as for fmt.Printf(). func Docf(raw string, args ...interface{ … }