From 79ede3665303602214621329cfd5a2a62190ebab Mon Sep 17 00:00:00 2001 From: Xabier Larrakoetxea Date: Wed, 8 May 2019 05:50:57 +0200 Subject: [PATCH] Use strings.Replace instead strings.ReplaceAll to have support for go >=1.10 Signed-off-by: Xabier Larrakoetxea --- widgets/linechart/value_formatter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/linechart/value_formatter.go b/widgets/linechart/value_formatter.go index 35e71d5..c629469 100644 --- a/widgets/linechart/value_formatter.go +++ b/widgets/linechart/value_formatter.go @@ -69,7 +69,7 @@ func durationSingleUnitPrettyFormat(d time.Duration, decimals int) 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) }