title: Not enough arguments in call
body: <p>I'm trying to create a go app that will display the users IP.</p>
  
  <p>I can't figure out my Log Console error:</p>
  
  <blockquote>
    <p>go:14: not enough arguments in call to getJsonRes</p>
  </blockquote>
  
  <p>Go app code:</p>
  
  <pre><code>package main
  
  import (
      "encoding/json"
      "net/http"
      "fmt"
  )
  
  type Addrs struct {
      ip string
  }
  
  func handler(w http.ResponseWriter, r *http.Request) {
      response, err := getJsonRes()
      if err != nil {
      http.Error(w, err.Error(), http.StatusInternalServerError)
      return
      }
      w.Header().Set("Content-Type", "application/json")
      fmt.Fprintf(w, string(response))
  }
  
  func main() {
      http.HandleFunc("/", handler)
  }
  
  func getJsonRes(r *http.Request)([]byte, error ) {
      ip := Addrs{ r.RemoteAddr }
  
      return json.MarshalIndent(ip, "", " ")
  }
  </code></pre>