Gin middleware to support robots.txt.
based on https://github.com/thinkerou/favicon
Download and install it:
$ go get github.com/vasiliyaltunin/gorobots
Import it in your code:
import "github.com/vasiliyaltunin/gorobots"
package main
import (
"github.com/gin-gonic/gin"
"github.com/vasiliyaltunin/gorobots"
)
func main() {
r := gin.Default()
r.Use(gorobots.New("./static/robots/robots.txt"))
r.Run(":8080")
}