mirror of https://github.com/mum4k/termdash.git
Use strings.Replace instead strings.ReplaceAll to have support for go >=1.10
Signed-off-by: Xabier Larrakoetxea <slok69@gmail.com>
This commit is contained in:
parent
bfd354e253
commit
79ede36653
|
@ -69,7 +69,7 @@ func durationSingleUnitPrettyFormat(d time.Duration, decimals int) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func suffixDecimalFormat(decimals int, suffix string) string {
|
func suffixDecimalFormat(decimals int, suffix string) string {
|
||||||
suffix = strings.ReplaceAll(suffix, "%", "%%") // safe `%` character for fmt.
|
suffix = strings.Replace(suffix, "%", "%%", -1) // Safe `%` character for fmt.
|
||||||
return fmt.Sprintf("%%.%df%s", decimals, suffix)
|
return fmt.Sprintf("%%.%df%s", decimals, suffix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue