Documentation
¶
Index ¶
- func CalculateAbsoluteChange(oldVal int64, newVal int64) string
- func CalculatePercentageChange(oldVal int64, newVal int64) string
- func FormatBasic(value float64, lang language.Tag) string
- func FormatDetailed(value float64, lang language.Tag) string
- func FormatDuration(d time.Duration) time.Duration
- func FormatPubKey(value string) string
- func FormatRatePPM(value float64, total float64, lang language.Tag) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateAbsoluteChange ¶ added in v1.11.0
calculateAbsoluteChange calculates the absolute change between old and new values
func CalculatePercentageChange ¶ added in v1.11.0
calculatePercentageChange calculates the percentage change between old and new values
func FormatBasic ¶ added in v1.1.0
FormatWholeNumber formats a number with thousand separators, rounding to the nearest integer. Should be used for high-value amounts where fractional parts are not relevant.
func FormatDetailed ¶ added in v1.1.0
FormatSats formats a number with thousand separators and up to 3 decimal places. Should be used for fees or other fractional amounts.
func FormatPubKey ¶ added in v1.0.0
FormatPubKey formats a pubkey to a shorter version
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.