Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dedent ¶
Dedent removes any common leading whitespace from every line in text.
This can be used to make multiline strings to line up with the left edge of the display, while still presenting them in the source code in indented form.
Example ¶
s := ` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur justo tellus, facilisis nec efficitur dictum, fermentum vitae ligula. Sed eu convallis sapien.` fmt.Println(Dedent(s)) fmt.Println("-------------") fmt.Println(s)
Output: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur justo tellus, facilisis nec efficitur dictum, fermentum vitae ligula. Sed eu convallis sapien. ------------- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur justo tellus, facilisis nec efficitur dictum, fermentum vitae ligula. Sed eu convallis sapien.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.