Skip to content

Commit

Permalink
feat(elasticache/serverless): fix reader_endpoint port type
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Birkett <[email protected]>
  • Loading branch information
portswigger-tim committed Dec 3, 2024
1 parent 8e83741 commit 79a73eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/elasticache/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ func Configure(p *config.Provider) { //nolint:gocyclo
key := fmt.Sprintf("endpoint_%d_address", i)
conn[key] = []byte(address)
}
if port, ok := endpoint["port"].(float64); ok {
if port, ok := endpoint["port"]; ok {
key := fmt.Sprintf("endpoint_%d_port", i)
conn[key] = []byte(fmt.Sprintf("%g", port))
conn[key] = []byte(fmt.Sprintf("%v", port))
}
}
}
Expand All @@ -205,9 +205,9 @@ func Configure(p *config.Provider) { //nolint:gocyclo
key := fmt.Sprintf("reader_endpoint_%d_address", i)
conn[key] = []byte(address)
}
if port, ok := readerendpoint["port"].(float64); ok {
if port, ok := readerendpoint["port"]; ok {
key := fmt.Sprintf("reader_endpoint_%d_port", i)
conn[key] = []byte(fmt.Sprintf("%g", port))
conn[key] = []byte(fmt.Sprintf("%v", port))
}
}
}
Expand Down

0 comments on commit 79a73eb

Please sign in to comment.