Replaced <= 0 with < 1 for readability's sake
This commit is contained in:
parent
cf79bc1d3d
commit
8ddbe8b2c6
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "0.28.2"
|
var Version = "0.28.3"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(versionCmd)
|
rootCmd.AddCommand(versionCmd)
|
||||||
|
|
|
@ -209,7 +209,7 @@ func refererToUri(referer string) string {
|
||||||
func getRealIp(r *http.Request) string {
|
func getRealIp(r *http.Request) string {
|
||||||
remoteAddr := strings.SplitAfter(r.RemoteAddr, ":")
|
remoteAddr := strings.SplitAfter(r.RemoteAddr, ":")
|
||||||
|
|
||||||
if len(remoteAddr) <= 0 {
|
if len(remoteAddr) < 1 {
|
||||||
return r.RemoteAddr
|
return r.RemoteAddr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue