lines

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Indent

func Indent(lines []string, prefix string, skip int) (indented []string)

Indent returns the lines with the given prefix prepended. If skip is positive, then that many lines will be skipped before indenting the remainder.

func Sprintf

func Sprintf(format string, a ...any) []string

Sprintf returns fmt.Sprintf(format, a...) split on newlines.

func TrimTrailing

func TrimTrailing(lines []string, cutset string) (trimmed []string)

TrimTrailing removes trailing lines that are empty after applying strings.Trim.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL