title: Golang Gin "c.Param undefined (type *gin.Context has no field or method Param)"
body: <p>I tried to use the Gin which is framework for Golang.<br>
  <a href="https://github.com/gin-gonic/gin" rel="nofollow">https://github.com/gin-gonic/gin</a></p>
  
  <p>And the I copied sample codes from official github.<br>
  It's like this.  </p>
  
  <pre><code>package main
  
  import (
     "github.com/gin-gonic/gin"
     "net/http"
  )
  
  func main() {
      router := gin.Default()
  
      router.GET("/user/:name", func(c *gin.Context) {
          name := c.Param("name")
          c.String(http.StatusOK, "Hello %s", name)
          })
  
      router.Run(":8080")
  }
  </code></pre>
  
  <p>But I got the error.  </p>
  
  <pre><code># go run main.go
  # command-line-arguments ./main.go:12: c.Param undefined (type *gin.Context has no field or method Param)
  </code></pre>
  
  <p>Does anyone know how can I fix the problem ?</p>
  
  <p>・CentOS7</p>
  
  <p>・go version go1.6.3 linux/amd64</p>
  
  <h3>Edit:</h3>
  
  <p>I actually use the glide but I updated gin as global.
  And also update Go to 1.7 but getting still the same error:</p>
  
  <pre><code># go get -u -v github.com/gin-gonic/gin
  github.com/gin-gonic/gin (download)
  github.com/golang/protobuf (download)
  Fetching https://gopkg.in/go-playground/validator.v8?go-get=1
  https fetch failed: Get https://gopkg.in/go-playground/validator.v8?go-get=1: dial tcp: lookup gopkg.in on 192.168.11.1:53: dial udp 192.168.11.1:53: i/o timeout
  gopkg.in/go-playground/validator.v8 (download)
  Fetching https://gopkg.in/yaml.v2?go-get=1
  https fetch failed: Get https://gopkg.in/yaml.v2?go-get=1: dial tcp: lookup gopkg.in on 192.168.11.1:53: dial udp 192.168.11.1:53: i/o timeout
  gopkg.in/yaml.v2 (download)
  github.com/manucorporat/sse (download)
  Fetching https://golang.org/x/net/context?go-get=1
  Parsing meta tags from https://golang.org/x/net/context?go-get=1 (status code 200)
  get "golang.org/x/net/context": found meta tag main.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net/context?go-get=1
  get "golang.org/x/net/context": verifying non-authoritative meta tag
  Fetching https://golang.org/x/net?go-get=1
  Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
  golang.org/x/net (download)
  
  # go version
  go version go1.7 linux/amd64
  
  # go run test.go
  # command-line-arguments
  ./test.go:12: c.Param undefined (type *gin.Context has no field or method Param)
  </code></pre>