mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 22:32:26 +08:00
remove nil statement
This commit is contained in:
parent
2d7fc06969
commit
3483d2c07d
@ -767,8 +767,7 @@ func (c *Context) RemoteIP() (net.IP, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
trustedCIDRs, err := c.engine.prepareTrustedCIDRs()
|
||||
if err == nil {
|
||||
trustedCIDRs, _ := c.engine.prepareTrustedCIDRs()
|
||||
c.engine.trustedCIDRs = trustedCIDRs
|
||||
if c.engine.trustedCIDRs != nil {
|
||||
for _, cidr := range c.engine.trustedCIDRs {
|
||||
@ -777,7 +776,6 @@ func (c *Context) RemoteIP() (net.IP, bool) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return remoteIP, false
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user