title: route method becomes undefined in main package file
body: <p>My code is as shown below :</p>
  
  <p>app.go</p>
  
  <pre><code>package main
  
  import (
      "github.com/go-martini/martini"
  )
  
  func main() {
      app := martini.Classic()
  
      app.Group("/books", func(r martini.Router) {
  
          r.Get("/:id", getBooks)
          r.Post("/new", newBook)
          r.Put("/update/:id", updateBook)
          r.Delete("/delete/:id", deleteBook)
      })
  
      app.RunOnAddr(":8080")
  }
  </code></pre>
  
  <p>main.go</p>
  
  <pre><code>package main
  
  import "github.com/go-martini/martini"
  
  func getBooks() string {
  
      return "get books api called"
  }
  
  func newBook() string {
      return "Psot book api called"
  }
  
  func updateBook(params martini.Params) string {
      return "put api called " + params["id"]
  }
  
  func deleteBook(params martini.Params) string {
      return "delete api called " + params["id"]
  }
  </code></pre>
  
  <p>But somehow when I run the code , it gives me the following error :</p>
  
  <p><code>./app.go:16:17: undefined: getBooks
  ./app.go:17:18: undefined: newBook
  ./app.go:18:24: undefined: updateBook
  ./app.go:19:27: undefined: deleteBook</code></p>
  
  <p>So is there any way to solve this problem? </p>
  
  <p>the project structure is as follows:</p>
  
  <pre><code>goProject
  ----&gt;app.go
  ----&gt;main.go
  </code></pre>