@@ -430,9 +430,9 @@ func (sc ServerConfigurations) URL(index int, variables map[string]string) (stri
430430 if ! found {
431431 return "" , fmt .Errorf ("the variable %s in the server URL has invalid value %v. Must be %v" , name , value , variable .EnumValues )
432432 }
433- serverUrl = strings .Replace (serverUrl , "{" + name + "}" , value , - 1 )
433+ serverUrl = strings .ReplaceAll (serverUrl , "{" + name + "}" , value )
434434 } else {
435- serverUrl = strings .Replace (serverUrl , "{" + name + "}" , variable .DefaultValue , - 1 )
435+ serverUrl = strings .ReplaceAll (serverUrl , "{" + name + "}" , variable .DefaultValue )
436436 }
437437 }
438438 return serverUrl , nil
@@ -554,7 +554,7 @@ func ConfigureRegion(cfg *Configuration) error {
554554 }
555555 // API is regional (not global)
556556 if containsCaseSensitive (availableRegions , cfg .Region ) {
557- cfgUrl := strings .Replace (servers [0 ].URL , "{region}" , fmt .Sprintf ("%s." , cfg .Region ), - 1 )
557+ cfgUrl := strings .ReplaceAll (servers [0 ].URL , "{region}" , fmt .Sprintf ("%s." , cfg .Region ))
558558 cfg .Servers = ServerConfigurations {
559559 {
560560 URL : cfgUrl ,
@@ -574,7 +574,7 @@ func ConfigureRegion(cfg *Configuration) error {
574574 }
575575 // If the url is a template, generated using deprecated config.json, the region variable is replaced
576576 // If the url is already configured, there is no region variable and it remains the same
577- cfgUrl := strings .Replace (servers [0 ].URL , "{region}" , "" , - 1 )
577+ cfgUrl := strings .ReplaceAll (servers [0 ].URL , "{region}" , "" )
578578 cfg .Servers = ServerConfigurations {
579579 {
580580 URL : cfgUrl ,
0 commit comments