mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Run gofmt when building assets
This commit is contained in:
parent
e5dfacb4bb
commit
f729aece51
3
Makefile
3
Makefile
@ -12,9 +12,12 @@ STATICFILES := $(wildcard static/*)
|
||||
TEMPLATES := $(wildcard templates/*)
|
||||
bindata.go: $(STATICFILES) $(TEMPLATES)
|
||||
go-bindata -tags '!debug' static/... templates/...
|
||||
go fmt
|
||||
|
||||
bindata-debug.go: $(STATICFILES) $(TEMPLATES)
|
||||
go-bindata -tags 'debug' -o bindata-debug.go -debug static/... templates/...
|
||||
go fmt
|
||||
|
||||
|
||||
.PHONY: devel
|
||||
devel: bindata-debug.go
|
||||
|
@ -3,6 +3,7 @@
|
||||
// static/.DS_Store
|
||||
// static/css/base-min.css
|
||||
// static/css/default.css
|
||||
// static/css/dropzone.css
|
||||
// static/css/github-markdown.css
|
||||
// static/css/highlight.css
|
||||
// static/css/menus-min.css
|
||||
@ -35,6 +36,7 @@
|
||||
// static/img/cowyo/ms-icon-70x70.png
|
||||
// static/img/logo.png
|
||||
// static/js/cowyo.js
|
||||
// static/js/dropzone.js
|
||||
// static/js/highlight.min.js
|
||||
// static/js/highlight.pack.js
|
||||
// static/js/jquery-1.8.3.js
|
||||
@ -128,6 +130,24 @@ func staticCssDefaultCss() (*asset, error) {
|
||||
return a, err
|
||||
}
|
||||
|
||||
// staticCssDropzoneCss reads file data from disk. It returns an error on failure.
|
||||
func staticCssDropzoneCss() (*asset, error) {
|
||||
path := "/Volumes/Code/go/src/github.com/danielheath/cowyo/static/css/dropzone.css"
|
||||
name := "static/css/dropzone.css"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// staticCssGithubMarkdownCss reads file data from disk. It returns an error on failure.
|
||||
func staticCssGithubMarkdownCss() (*asset, error) {
|
||||
path := "/Volumes/Code/go/src/github.com/danielheath/cowyo/static/css/github-markdown.css"
|
||||
@ -704,6 +724,24 @@ func staticJsCowyoJs() (*asset, error) {
|
||||
return a, err
|
||||
}
|
||||
|
||||
// staticJsDropzoneJs reads file data from disk. It returns an error on failure.
|
||||
func staticJsDropzoneJs() (*asset, error) {
|
||||
path := "/Volumes/Code/go/src/github.com/danielheath/cowyo/static/js/dropzone.js"
|
||||
name := "static/js/dropzone.js"
|
||||
bytes, err := bindataRead(path, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: fi}
|
||||
return a, err
|
||||
}
|
||||
|
||||
// staticJsHighlightMinJs reads file data from disk. It returns an error on failure.
|
||||
func staticJsHighlightMinJs() (*asset, error) {
|
||||
path := "/Volumes/Code/go/src/github.com/danielheath/cowyo/static/js/highlight.min.js"
|
||||
@ -957,6 +995,7 @@ var _bindata = map[string]func() (*asset, error){
|
||||
"static/.DS_Store": staticDs_store,
|
||||
"static/css/base-min.css": staticCssBaseMinCss,
|
||||
"static/css/default.css": staticCssDefaultCss,
|
||||
"static/css/dropzone.css": staticCssDropzoneCss,
|
||||
"static/css/github-markdown.css": staticCssGithubMarkdownCss,
|
||||
"static/css/highlight.css": staticCssHighlightCss,
|
||||
"static/css/menus-min.css": staticCssMenusMinCss,
|
||||
@ -989,6 +1028,7 @@ var _bindata = map[string]func() (*asset, error){
|
||||
"static/img/cowyo/ms-icon-70x70.png": staticImgCowyoMsIcon70x70Png,
|
||||
"static/img/logo.png": staticImgLogoPng,
|
||||
"static/js/cowyo.js": staticJsCowyoJs,
|
||||
"static/js/dropzone.js": staticJsDropzoneJs,
|
||||
"static/js/highlight.min.js": staticJsHighlightMinJs,
|
||||
"static/js/highlight.pack.js": staticJsHighlightPackJs,
|
||||
"static/js/jquery-1.8.3.js": staticJsJquery183Js,
|
||||
@ -1041,12 +1081,14 @@ type bintree struct {
|
||||
Func func() (*asset, error)
|
||||
Children map[string]*bintree
|
||||
}
|
||||
|
||||
var _bintree = &bintree{nil, map[string]*bintree{
|
||||
"static": &bintree{nil, map[string]*bintree{
|
||||
".DS_Store": &bintree{staticDs_store, map[string]*bintree{}},
|
||||
"css": &bintree{nil, map[string]*bintree{
|
||||
"base-min.css": &bintree{staticCssBaseMinCss, map[string]*bintree{}},
|
||||
"default.css": &bintree{staticCssDefaultCss, map[string]*bintree{}},
|
||||
"dropzone.css": &bintree{staticCssDropzoneCss, map[string]*bintree{}},
|
||||
"github-markdown.css": &bintree{staticCssGithubMarkdownCss, map[string]*bintree{}},
|
||||
"highlight.css": &bintree{staticCssHighlightCss, map[string]*bintree{}},
|
||||
"menus-min.css": &bintree{staticCssMenusMinCss, map[string]*bintree{}},
|
||||
@ -1085,6 +1127,7 @@ var _bintree = &bintree{nil, map[string]*bintree{
|
||||
}},
|
||||
"js": &bintree{nil, map[string]*bintree{
|
||||
"cowyo.js": &bintree{staticJsCowyoJs, map[string]*bintree{}},
|
||||
"dropzone.js": &bintree{staticJsDropzoneJs, map[string]*bintree{}},
|
||||
"highlight.min.js": &bintree{staticJsHighlightMinJs, map[string]*bintree{}},
|
||||
"highlight.pack.js": &bintree{staticJsHighlightPackJs, map[string]*bintree{}},
|
||||
"jquery-1.8.3.js": &bintree{staticJsJquery183Js, map[string]*bintree{}},
|
||||
@ -1150,4 +1193,3 @@ func _filePath(dir, name string) string {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||
}
|
||||
|
||||
|
10
bindata.go
10
bindata.go
@ -192,7 +192,7 @@ func staticCssDropzoneCss() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "static/css/dropzone.css", size: 12587, mode: os.FileMode(420), modTime: time.Unix(1519120693, 0)}
|
||||
info := bindataFileInfo{name: "static/css/dropzone.css", size: 12587, mode: os.FileMode(420), modTime: time.Unix(1519120942, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@ -832,7 +832,7 @@ func staticJsCowyoJs() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "static/js/cowyo.js", size: 13535, mode: os.FileMode(420), modTime: time.Unix(1519120693, 0)}
|
||||
info := bindataFileInfo{name: "static/js/cowyo.js", size: 13535, mode: os.FileMode(420), modTime: time.Unix(1519120942, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@ -852,7 +852,7 @@ func staticJsDropzoneJs() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "static/js/dropzone.js", size: 120533, mode: os.FileMode(420), modTime: time.Unix(1519120693, 0)}
|
||||
info := bindataFileInfo{name: "static/js/dropzone.js", size: 120533, mode: os.FileMode(420), modTime: time.Unix(1519120942, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@ -1072,7 +1072,7 @@ func templatesIndexTmpl() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "templates/index.tmpl", size: 12961, mode: os.FileMode(493), modTime: time.Unix(1519120693, 0)}
|
||||
info := bindataFileInfo{name: "templates/index.tmpl", size: 12961, mode: os.FileMode(493), modTime: time.Unix(1519120942, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@ -1218,6 +1218,7 @@ type bintree struct {
|
||||
Func func() (*asset, error)
|
||||
Children map[string]*bintree
|
||||
}
|
||||
|
||||
var _bintree = &bintree{nil, map[string]*bintree{
|
||||
"static": &bintree{nil, map[string]*bintree{
|
||||
".DS_Store": &bintree{staticDs_store, map[string]*bintree{}},
|
||||
@ -1329,4 +1330,3 @@ func _filePath(dir, name string) string {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user