Skip to content

Commit

Permalink
set int upper bound
Browse files Browse the repository at this point in the history
Signed-off-by: James Ranson <[email protected]>
  • Loading branch information
jranson committed Dec 15, 2022
1 parent 867b39d commit c653c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/trickster/config/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ func (c *Config) loadEnvVars() {

// Proxy Port
if x := os.Getenv(evProxyPort); x != "" {
if y, err := strconv.ParseInt(x, 10, 64); err == nil {
if y, err := strconv.ParseInt(x, 10, 32); err == nil {
c.Frontend.ListenPort = int(y)
}
}

// Metrics Port
if x := os.Getenv(evMetricsPort); x != "" {
if y, err := strconv.ParseInt(x, 10, 64); err == nil {
if y, err := strconv.ParseInt(x, 10, 32); err == nil {
c.Metrics.ListenPort = int(y)
}
}
Expand Down

0 comments on commit c653c9d

Please sign in to comment.