From 8ddbe8b2c6aeb7c2827985c6321d48a4f177a568 Mon Sep 17 00:00:00 2001 From: Seednode Date: Tue, 20 Dec 2022 18:24:07 -0600 Subject: [PATCH] Replaced <= 0 with < 1 for readability's sake --- cmd/version.go | 2 +- cmd/web.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/version.go b/cmd/version.go index 3b74773..aa3cf03 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.28.2" +var Version = "0.28.3" func init() { rootCmd.AddCommand(versionCmd) diff --git a/cmd/web.go b/cmd/web.go index ff2e8e2..576f3ef 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -209,7 +209,7 @@ func refererToUri(referer string) string { func getRealIp(r *http.Request) string { remoteAddr := strings.SplitAfter(r.RemoteAddr, ":") - if len(remoteAddr) <= 0 { + if len(remoteAddr) < 1 { return r.RemoteAddr }