title: GOLANG , in localhost server how to print ip ? (127.0.0.1 )
body: <p>i have this code where i try to get the localhost ip  127.0.0.1</p>
  <pre><code>func (m *Repostory) HomeHandeler(w http.ResponseWriter, r *http.Request) {
      
      // Loop over header names
      for name, values := range r.Header {
          // Loop over all values for the name.
          for _, value := range values {
              fmt.Println(name, value)
          }
      }
      remoteIP := utils.ReadUserIP(r)
  }
  </code></pre>
  <p>the result of the loop :</p>
  <pre><code>Sec-Ch-Ua &quot; Not A;Brand&quot;;v=&quot;99&quot;, &quot;Chromium&quot;;v=&quot;102&quot;, &quot;Google Chrome&quot;;v=&quot;102&quot;
  Sec-Ch-Ua-Mobile ?0
  Cookie csrf_token=4f7iGnCzBTPXwP6snm6Gxxxc3Qe6P9GwVcaR7F3vUtmRuE=; session=yA0nwu4wWMH up79U9ERfzuWg
  Accept-Language en,en-US;q=0.9,he;q=0.8
  Connection keep-alive
  Cache-Control max-age=0
  Sec-Ch-Ua-Platform &quot;Windows&quot;
  Upgrade-Insecure-Requests 1
  User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
  Accept text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
  Sec-Fetch-Mode navigate
  Sec-Fetch-User ?1
  Accept-Encoding gzip, deflate, br
  Sec-Fetch-Site none
  Sec-Fetch-Dest document
  </code></pre>
  <p>but the result of remoteIP :</p>
  <pre><code>[::1]:55310
  </code></pre>