Golang dedent: Difference between revisions
From wikinotes
(Created page with "A single-function library that dedents strings. = Documentation = <blockquote> {| class="wikitable" |- | github || https://github.com/lithammer/dedent |- |} </blockquote><!-- Documentation --> = Install = <blockquote> <syntaxhighlight lang="bash"> go get github.com/lithammer/dedent </syntaxhighlight> </blockquote><!-- Install --> = Usage = <blockquote> <syntaxhighlight lang="go"> import "dedent" dedent.Dedent(` a: b: 1 c: 2 `) //a: // b: 1 </syntaxhi...") |
(→Usage) |
||
Line 29: | Line 29: | ||
//a: | //a: | ||
// b: 1 | // b: 1 | ||
// c: 2 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Usage --> | </blockquote><!-- Usage --> |
Latest revision as of 17:01, 2 July 2022
A single-function library that dedents strings.
Documentation
github https://github.com/lithammer/dedent
Install
go get github.com/lithammer/dedent
Usage
import "dedent" dedent.Dedent(` a: b: 1 c: 2 `) //a: // b: 1 // c: 2