Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dedent ¶
Dedent strips leading tabs from every line of a string, taking a hint of how many tabs should be stripped from the number of consecutive tabs found on the first non-empty line. Dedent also strips one leading blank line if it contains nothing but the linebreak.
If later lines have fewer leading tab characters than the depth we intuited from the first line, then stripping will still only remove tab characters.
Roughly, Dedent is "Do What I Mean" to normalize a heredoc string that contains leading indentation to make it congruent with the surrounding source code.
func DedentBytes ¶
DedentBytes is identically to Dedent, but works on a byte slice.
Types ¶
This section is empty.