Skip to content

Commit

Permalink
Use Replace rather then ReplaceALL
Browse files Browse the repository at this point in the history
  • Loading branch information
skmcgrail committed Nov 4, 2021
1 parent 304e894 commit 7e9b5de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,8 @@ func normalizeRegion(cfg *aws.Config) (resolved string) {
if strings.Contains(region, fipsInfix) ||
strings.Contains(region, fipsPrefix) ||
strings.Contains(region, fipsSuffix) {
resolved = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
resolved = strings.Replace(strings.Replace(strings.Replace(
region, fipsInfix, "-", -1), fipsPrefix, "", -1), fipsSuffix, "", -1)
cfg.UseFIPSEndpoint = endpoints.FIPSEndpointStateEnabled
}

Expand Down

0 comments on commit 7e9b5de

Please sign in to comment.