partially rewrite for own needs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-01-08 22:22:43 +03:00
parent 9b2c559015
commit c27cf5982d
255 changed files with 1301 additions and 35036 deletions

View File

@@ -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
View 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
View File

@@ -0,0 +1 @@
package assets

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