jessevdk / go-assets

Simple embedding of assets in go

Home Page:http://godoc.org/github.com/jessevdk/go-assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to implement http.FileSystem interfaces in assets?

zcvxcv opened this issue · comments

commented

Hi~
 How to implement http.FileSystem interfaces in assets?
Gin
like this:

import (
	"github.com/gin-gonic/gin"
	"github.com/jessevdk/go-assets"
)
func main() {
         r := gin.Default()
         r.StaticFS ("/css", http.Dir("/css"))  // What should be substituted for the “http.Dir("/css")” ?
}