partially rewrite for own needs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
/Users/moul/go/src/moul.io/protoc-gen-gotemplate/assets:
|
||||
total used in directory 552 available 9223372036849978910
|
||||
drwxr-xr-x 4 moul staff 128 Dec 9 11:31 .
|
||||
lrwxr-xr-x 1 moul staff 33 Dec 9 11:31 .#web-editor.jpg -> moul@manfred-spacegray.local.9471
|
||||
drwxr-xr-x 21 moul staff 672 Sep 13 18:05 ..
|
||||
-rw-r--r--@ 1 moul staff 280357 Oct 26 2017 web-editor.jpg
|
||||
20
assets/assets.go
Normal file
20
assets/assets.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// +build dev
|
||||
|
||||
package assets
|
||||
|
||||
import (
|
||||
"go/build"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func importPathToDir(importPath string) string {
|
||||
p, err := build.Import(importPath, "", build.FindOnly)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return p.Dir
|
||||
}
|
||||
|
||||
// Assets contains the project's assets.
|
||||
var Assets http.FileSystem = http.Dir("./templates")
|
||||
1
assets/stub.go
Normal file
1
assets/stub.go
Normal file
@@ -0,0 +1 @@
|
||||
package assets
|
||||
202
assets/vfsdata.go
Normal file
202
assets/vfsdata.go
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 274 KiB |
Reference in New Issue
Block a user