Documentation ¶
Overview ¶
Package indent provides indentation generation methods.
Index ¶
- func Bytes(ich Character, n, width int) []byte
- func Len(ich Character, n, width int) int
- func SpaceBytes(n, width int) []byte
- func Spaces(n, width int) string
- func String(ich Character, n, width int) string
- func TabBytes(n int) []byte
- func Tabs(n int) string
- type Character
- func (i Character) Desc() string
- func (i Character) Int64() int64
- func (i Character) MarshalText() ([]byte, error)
- func (i *Character) SetInt64(in int64)
- func (i *Character) SetString(s string) error
- func (i Character) String() string
- func (i *Character) UnmarshalText(text []byte) error
- func (i Character) Values() []enums.Enum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SpaceBytes ¶
SpaceBytes returns a []byte of n*width spaces.
Types ¶
type Character ¶ added in v0.2.1
type Character int32 //enums:enum
Character is the type of indentation character to use.
const CharacterN Character = 2
CharacterN is the highest valid value for type Character, plus one.
func CharacterValues ¶ added in v0.2.1
func CharacterValues() []Character
CharacterValues returns all possible values for the type Character.
func (Character) MarshalText ¶ added in v0.2.1
MarshalText implements the encoding.TextMarshaler interface.
func (*Character) SetString ¶ added in v0.2.1
SetString sets the Character value from its string representation, and returns an error if the string is invalid.
func (Character) String ¶ added in v0.2.1
String returns the string representation of this Character value.
func (*Character) UnmarshalText ¶ added in v0.2.1
UnmarshalText implements the encoding.TextUnmarshaler interface.
Click to show internal directories.
Click to hide internal directories.