fix golint issues in core/threading (#524)

This commit is contained in:
Kevin Wan
2021-02-26 16:27:04 +08:00
committed by GitHub
parent f309e9f80c
commit ad32f9de23
5 changed files with 11 additions and 3 deletions

View File

@@ -2,11 +2,11 @@ package httpx
import "net/http"
const xForwardFor = "X-Forwarded-For"
const xForwardedFor = "X-Forwarded-For"
// GetRemoteAddr returns the peer address, supports X-Forward-For.
func GetRemoteAddr(r *http.Request) string {
v := r.Header.Get(xForwardFor)
v := r.Header.Get(xForwardedFor)
if len(v) > 0 {
return v
}