From f0be4cd076899801967b0490ac8428458c057ce6 Mon Sep 17 00:00:00 2001 From: sbruens Date: Mon, 15 Jul 2024 21:35:04 -0400 Subject: [PATCH] Use `strconv.ParseInt`. --- x/config/proxyproto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/config/proxyproto.go b/x/config/proxyproto.go index 29c70d73..7d2b617f 100644 --- a/x/config/proxyproto.go +++ b/x/config/proxyproto.go @@ -45,7 +45,7 @@ func parseProxyProtoConfig(configURL *url.URL) (*proxyProtoConfig, error) { if len(values) != 1 { return nil, fmt.Errorf("version option must has one value, found %v", len(values)) } - version, err := strconv.Atoi(values[0]) + version, err := strconv.ParseInt(values[0], 10, 8) if err != nil { return nil, fmt.Errorf("version must be a number") }