lines

package
v3.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package line provides a datatype for text lines that are generated by package tag.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

type Line struct {
	// contains filtered or unexported fields
}

Line is a line of text.

func IndentableFrom

func IndentableFrom(contents string) Line

IndentableFrom returns a line that you can and will indent. Use for most tags.

func UnindentableFrom

func UnindentableFrom(contents string) Line

UnindentableFrom returns a line that you cannot indent. Use for codeblocks and stuff like that.

func (Line) Contents added in v3.2.1

func (l Line) Contents() string

Contents returns line's contents

func (Line) Indented

func (l Line) Indented() Line

Indented returns a copy of the line with one more indentation (for indentable lines) or the same line (for unindentable lines).

func (Line) IsIndentable added in v3.2.1

func (l Line) IsIndentable() bool

IsIndentable is true if the line is indentable.

func (Line) String

func (l Line) String() string

String returns the line with the appropriate number of indentations (\t) and a newline.

Jump to

Keyboard shortcuts

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