Skip to content
Snippets Groups Projects
Commit 53f2e2b0 authored by Will McCutchen's avatar Will McCutchen
Browse files

Generate bindata from assets dir, not templates

parent 8f99a514
No related branches found
No related tags found
No related merge requests found
...@@ -4,8 +4,8 @@ dist/go-httpbin: assets *.go httpbin/*.go ...@@ -4,8 +4,8 @@ dist/go-httpbin: assets *.go httpbin/*.go
mkdir -p dist mkdir -p dist
go build -o dist/go-httpbin go build -o dist/go-httpbin
assets: httpbin/templates/*.html assets: httpbin/assets/*
go-bindata -o httpbin/templates.go -pkg=httpbin -prefix=httpbin/templates httpbin/templates go-bindata -o httpbin/assets.go -pkg=httpbin -prefix=httpbin/assets httpbin/assets
test: test:
go test -v github.com/mccutchen/go-httpbin/httpbin go test -v github.com/mccutchen/go-httpbin/httpbin
......
// Code generated by go-bindata. // Code generated by go-bindata.
// sources: // sources:
// httpbin/templates/forms-post.html // httpbin/assets/forms-post.html
// httpbin/templates/index.html // httpbin/assets/index.html
// httpbin/templates/moby.html // httpbin/assets/moby.html
// httpbin/templates/utf8.html // httpbin/assets/utf8.html
// DO NOT EDIT! // DO NOT EDIT!
package httpbin package httpbin
...@@ -204,9 +204,9 @@ func AssetNames() []string { ...@@ -204,9 +204,9 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name. // _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){ var _bindata = map[string]func() (*asset, error){
"forms-post.html": formsPostHtml, "forms-post.html": formsPostHtml,
"index.html": indexHtml, "index.html": indexHtml,
"moby.html": mobyHtml, "moby.html": mobyHtml,
"utf8.html": utf8Html, "utf8.html": utf8Html,
} }
// AssetDir returns the file names below a certain // AssetDir returns the file names below a certain
...@@ -248,11 +248,12 @@ type bintree struct { ...@@ -248,11 +248,12 @@ type bintree struct {
Func func() (*asset, error) Func func() (*asset, error)
Children map[string]*bintree Children map[string]*bintree
} }
var _bintree = &bintree{nil, map[string]*bintree{ var _bintree = &bintree{nil, map[string]*bintree{
"forms-post.html": &bintree{formsPostHtml, map[string]*bintree{}}, "forms-post.html": &bintree{formsPostHtml, map[string]*bintree{}},
"index.html": &bintree{indexHtml, map[string]*bintree{}}, "index.html": &bintree{indexHtml, map[string]*bintree{}},
"moby.html": &bintree{mobyHtml, map[string]*bintree{}}, "moby.html": &bintree{mobyHtml, map[string]*bintree{}},
"utf8.html": &bintree{utf8Html, map[string]*bintree{}}, "utf8.html": &bintree{utf8Html, map[string]*bintree{}},
}} }}
// RestoreAsset restores an asset under the given directory // RestoreAsset restores an asset under the given directory
...@@ -301,4 +302,3 @@ func _filePath(dir, name string) string { ...@@ -301,4 +302,3 @@ func _filePath(dir, name string) string {
cannonicalName := strings.Replace(name, "\\", "/", -1) cannonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
} }
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment