Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
14 - maintain golang compatibility pre v1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsaraf committed May 21, 2019
1 parent 37a91ad commit ae5de57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/model/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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)
}

0 comments on commit ae5de57

Please sign in to comment.