Awee

Utilities

Defaults, lengths, line numbers, and date formatting.

Utilities

ModifierDescription
decimalDecimal formats a number with a fixed number of decimal places.
defaultDefault returns the fallback value if the input is nil or an empty string.
formatFormat formats a time.
lengthLength returns the number of characters in a string, bytes in a byte slice, or elements in a slice/array/map.
line-numbersLineNumbers prepends each line of the string with its zero-based line number.

How is this guide?

On this page