Utilities
Defaults, lengths, line numbers, and date formatting.
Utilities
| Modifier | Description |
|---|---|
decimal | Decimal formats a number with a fixed number of decimal places. |
default | Default returns the fallback value if the input is nil or an empty string. |
format | Format formats a time. |
length | Length returns the number of characters in a string, bytes in a byte slice, or elements in a slice/array/map. |
line-numbers | LineNumbers prepends each line of the string with its zero-based line number. |
How is this guide?