1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 22:59:43 +02:00

move embedded assets to separate directory

This commit is contained in:
Elliott Stoneham 2016-07-22 20:56:56 +01:00
parent 1be2000bb7
commit 0b8a0fd5dc
7 changed files with 13286 additions and 25 deletions

44
embed/embed.go Normal file
View file

@ -0,0 +1,44 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
// Package embed contains the Documize static web data.
package embed
//go:generate go-bindata-assetfs -pkg embed bindata/...
import (
"net/http"
"github.com/documize/community/core/web"
assetfs "github.com/elazarl/go-bindata-assetfs"
)
type embedderT struct{}
func (embedderT) Asset(name string) ([]byte, error) {
return Asset(name)
}
func (embedderT) AssetDir(dir string) ([]string, error) {
return AssetDir(dir)
}
// StaticAssetsFileSystem data encoded in the go:generate above.
func (embedderT) StaticAssetsFileSystem() http.FileSystem {
return &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, AssetInfo: AssetInfo, Prefix: "bindata/public"}
}
var embedder embedderT
func init() {
web.Embed = embedder
}