1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-11 05:55:29 +00:00

Use vfsgen instead of go-bindata (#7080)

* use vfsgen instead of go-bindata

* fix templates

* fix fmt

* vendor vsfgen
This commit is contained in:
Lunny Xiao
2019-06-03 05:43:47 +08:00
committed by Lauris BH
parent 8eba27c792
commit 83b90e4199
36 changed files with 1224 additions and 612 deletions

View File

@@ -7,19 +7,12 @@
package public
import (
"github.com/go-macaron/bindata"
"gopkg.in/macaron.v1"
)
// Static implements the macaron static handler for serving assets.
func Static(opts *Options) macaron.Handler {
opts.FileSystem = bindata.Static(bindata.Options{
Asset: Asset,
AssetDir: AssetDir,
AssetInfo: AssetInfo,
AssetNames: AssetNames,
Prefix: "",
})
opts.FileSystem = Assets
// we don't need to pass the directory, because the directory var is only
// used when in the options there is no FileSystem.
return opts.staticHandler("")