Discover Packages
github.com/goki/ki
indent
package
Version:
v1.1.17
Opens a new window with list of versions in this module.
Published: Oct 5, 2023
License: BSD-3-Clause
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 24
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package indent provides trivial indentation generation methods: Tabs,
Spaces, and Indent with a selector. Also bytes versions.
Just for clarity, simplicity.
Bytes returns []byte of n tabs or n*width spaces depending on the indent char
Len returns the length of the indent string given indent char and indent level
func SpaceBytes(n, width int ) []byte
SpaceBytes returns a []byte of n*width spaces
Spaces returns a string of n*width spaces
String returns a string of n tabs or n*width spaces depending on the indent char
TabBytes returns []byte of n tabs
Tabs returns a string of n tabs
Char is the type of indentation character to use
Source Files
¶
Click to show internal directories.
Click to hide internal directories.