From ae5de574f2fb998c4dd25433d8d9f99cb0dcc1d5 Mon Sep 17 00:00:00 2001 From: Nikhil Saraf <1028334+nikhilsaraf@users.noreply.github.com> Date: Mon, 20 May 2019 23:20:25 -0700 Subject: [PATCH] 14 - maintain golang compatibility pre v1.12 --- gui/model/bot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/model/bot.go b/gui/model/bot.go index d448623f4..bd074b9de 100644 --- a/gui/model/bot.go +++ b/gui/model/bot.go @@ -40,7 +40,7 @@ func (b *Bot) Filenames() *FilenamePair { // GetBotFilenames from botName func GetBotFilenames(botName string, strategy string) *FilenamePair { - converted := strings.ToLower(strings.ReplaceAll(botName, " ", "_")) + converted := strings.ToLower(strings.Replace(botName, " ", "_", -1)) return &FilenamePair{ Trader: fmt.Sprintf("%s__trader.%s", converted, "cfg"), Strategy: fmt.Sprintf("%s__strategy_%s.%s", converted, strategy, "cfg"), @@ -49,6 +49,6 @@ func GetBotFilenames(botName string, strategy string) *FilenamePair { // GetLogPrefix from botName func GetLogPrefix(botName string, strategy string) string { - converted := strings.ToLower(strings.ReplaceAll(botName, " ", "_")) + converted := strings.ToLower(strings.Replace(botName, " ", "_", -1)) return fmt.Sprintf("%s__%s_", converted, strategy) }