/de-indent

Go tool for deindenting the strings

Primary LanguageGo

de-indent

Go tool for deindenting the strings, good to use when writing multiline strings and still wanting to preserve good looking formatting like:

package main

import deindent "github.com/76creates/de-indent"

func main() {
	description := deindent.DeIndent(`
        Hello this is my description
        it stays classy :)
    `)
	print(description)
}
go run .
Hello this is my description
it stays classy :)