Skip to content

Commit

Permalink
update template to fix ReplaceAll
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Nov 13, 2020
1 parent 7e35430 commit 605dd76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/client/configuration.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ func (c *Configuration) ServerUrl(index int, variables map[string]string) (strin
if !found {
return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
}
url = strings.Replace(url, "{"+name+"}", value, -1)
url = strings.ReplaceAll(url, "{"+name+"}", value)
} else {
url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
url = strings.ReplaceAll(url, "{"+name+"}", variable.DefaultValue)
}
}
return url, nil
Expand Down

0 comments on commit 605dd76

Please sign in to comment.