forked from forgejo/forgejo
Use vfsgen instead of go-bindata (#7080)
* use vfsgen instead of go-bindata * fix templates * fix fmt * vendor vsfgen
This commit is contained in:
parent
8eba27c792
commit
83b90e4199
36 changed files with 1224 additions and 612 deletions
|
@ -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("")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue