How to make templates work with gin framework?
<p>I am newbie to golang.
To learn it I have started with a simple web app using <a href="https://github.com/gin-gonic/gin" rel="nofollow">gin</a> framework.
I have followed the gin doc &amp; configured template file but not able to make it work. I am getting an error -</p>

<blockquote>
<pre><code>panic: html/template: pattern matches no files: `templates/*`

goroutine 1 [running]:
html/template.Must
  /usr/local/Cellar/go/1.5.2/libexec/src/html/template/template.go:330
github.com/gin-gonic/gin.(*Engine).LoadHTMLGlob
  /Users/ameypatil/deployment/go/src/github.com/gin-gonic/gin/gin.go:126
main.main()
  /Users/ameypatil/deployment/go/src/github.com/ameykpatil/gospike/main.go:17
</code></pre>
</blockquote>

<p>Below is my code - </p>

<pre><code>package main

import (
    "net/http"

    "github.com/gin-gonic/gin"
)

func main() {
    //os.Setenv("GIN_MODE", "release")
    //gin.SetMode(gin.ReleaseMode)

    // Creates a gin router with default middleware:
    // logger and recovery (crash-free) middleware
    router := gin.Default()

    router.LoadHTMLGlob("templates/*")
    //router.LoadHTMLFiles("templates/index.tmpl")

    router.GET("/", func(c *gin.Context) {
        c.HTML(http.StatusOK, "index.tmpl", gin.H{
            "title": "GoSpike",
        })
    })

    // By default it serves on :8080 unless a
    // PORT environment variable was defined.
    router.Run(":4848")
}
</code></pre>

<p>My directory structure is</p>

<pre><code>- gospike
--- templates
------index.tmpl
--- main.go
</code></pre>

<p><code>go install</code> command does not give any error</p>

<p>but on actually running, it gives the above error. I searched &amp; there were similar issues logged on gin's github repo but they are closed now.
I have tried various things but I guess I am missing something obvious. What am I missing?  </p>