Browse Source

move static into own package

Change-Id: I8be408f295aa377a0a0c2879420f501ba0dadf5e
Stephen McQuay 3 years ago
parent
commit
5458745af9
No known key found for this signature in database
5 changed files with 599 additions and 598 deletions
  1. 1
    1
      gen.go
  2. 4
    3
      server.go
  3. 2
    2
      sql/static.go
  4. 0
    592
      static.go
  5. 592
    0
      static/static.go

+ 1
- 1
gen.go View File

@@ -5,4 +5,4 @@ package vain
5 5
 //go:generate rm -f sql/static.go
6 6
 //go:generate rm -f static.go
7 7
 //go:generate go-bindata -pkg sql -o sql/static.go sql/...
8
-//go:generate go-bindata -o static.go -pkg=vain _static/...
8
+//go:generate go-bindata -o static/static.go -pkg=static _static/...

+ 4
- 3
server.go View File

@@ -12,6 +12,7 @@ import (
12 12
 	"github.com/elazarl/go-bindata-assetfs"
13 13
 
14 14
 	verrors "mcquay.me/vain/errors"
15
+	"mcquay.me/vain/static"
15 16
 )
16 17
 
17 18
 const apiPrefix = "/api/v0/"
@@ -219,9 +220,9 @@ func addRoutes(sm *http.ServeMux, s *Server) {
219 220
 			prefix["static"],
220 221
 			http.FileServer(
221 222
 				&assetfs.AssetFS{
222
-					Asset:     Asset,
223
-					AssetDir:  AssetDir,
224
-					AssetInfo: AssetInfo,
223
+					Asset:     static.Asset,
224
+					AssetDir:  static.AssetDir,
225
+					AssetInfo: static.AssetInfo,
225 226
 				},
226 227
 			),
227 228
 		)

+ 2
- 2
sql/static.go View File

@@ -68,7 +68,7 @@ func (fi bindataFileInfo) Sys() interface{} {
68 68
 	return nil
69 69
 }
70 70
 
71
-var _sqlInitSql = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x74\xcf\x31\x4f\xc3\x30\x14\x04\xe0\x3d\xbf\xe2\xc6\x54\x62\x60\x67\x32\xc9\x55\x8a\x48\x03\xb8\x2f\x12\x1d\x4d\xfa\x54\xaa\xb6\x4e\x88\x53\x7e\x3f\x52\x2d\x43\x10\xed\x68\xdf\x93\xee\xbb\xc2\xd2\x08\x21\xe6\xb1\x26\xce\x41\xc7\x80\x3c\x03\x00\x3d\xb9\xfd\x11\xc2\x37\xc1\x8b\xad\x56\xc6\x6e\xf0\xc4\xcd\xdd\x25\x9b\xfa\x83\xfa\x98\xb5\x4d\xf5\xda\x32\x7e\x8f\xba\xdb\x87\x49\x47\xdd\xe2\xbd\xef\x8f\xea\x3c\x4a\x2e\x4d\x5b\x0b\xee\xd3\xc5\xe7\x59\xc3\xa4\x5b\x94\x46\x28\xd5\x8a\xd9\xe2\x21\xcb\xfe\x20\xbc\x3b\x69\x18\x5c\xa7\x49\xe2\xc3\x0d\xc6\x8c\x68\xb9\xa4\x65\x53\x70\x1d\x47\xe4\x97\x6c\x81\xe7\x06\x25\x6b\x0a\x51\x98\x75\x61\xca\x2b\x7d\x83\xeb\x0e\x6e\xf7\xd3\xf6\xd5\xc5\xba\x04\x1e\xfa\xd9\x73\x70\xd3\xc7\xff\xdd\x09\x38\x43\xfc\x8e\xc8\x7d\xb8\xc1\xf8\x0e\x00\x00\xff\xff\xc7\xbb\x93\xa7\x7b\x01\x00\x00")
71
+var _sqlInitSql = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x74\x8f\xc1\x4e\x84\x30\x14\x45\xf7\xfd\x8a\xb7\x64\x12\x17\xee\x5d\xd5\xf2\x26\x21\x32\xa8\x9d\x92\xc8\xb2\xc2\x0b\x12\xa0\x45\x0a\x7e\xbf\x0d\x4d\x15\xe3\xd0\x5d\x7b\x6f\x7a\xce\x15\x12\xb9\x42\x50\xfc\x31\x47\x58\x1d\xcd\x0e\x12\x06\xfe\xd0\xa8\xbb\x01\x14\xbe\x29\x78\x91\xd9\x85\xcb\x0a\x9e\xb0\xba\xdb\xb2\xc5\xf6\x64\x42\x56\x16\xd9\x6b\x89\xe1\x79\xa6\xb6\x73\x0b\xcd\xd4\xc0\xbb\xb5\x03\x69\x03\x29\x9e\x79\x99\x2b\xb8\x8f\x8d\xcf\x95\x7c\xa5\x81\xd4\x53\x55\x76\x41\x76\x7a\x60\xec\x8f\x84\xd1\x23\xb9\x49\xd7\x14\x4d\x8c\x3b\xd0\xd8\x29\x4a\x3c\xa3\xc4\x42\xe0\x35\x8c\x48\xb6\xec\x04\xcf\x85\x57\xc8\xd1\x7f\x2e\xf8\x55\xf0\xf4\x06\xcf\xa3\x7a\xdd\xfe\xd0\xbe\xea\x80\x8b\xc2\x93\xdd\x5d\x27\xbd\x7c\xfc\xdf\x1d\x05\x77\x12\xbf\x23\x12\xe3\x0e\x34\xbe\x03\x00\x00\xff\xff\xc7\xbb\x93\xa7\x7b\x01\x00\x00")
72 72
 
73 73
 func sqlInitSqlBytes() ([]byte, error) {
74 74
 	return bindataRead(
@@ -83,7 +83,7 @@ func sqlInitSql() (*asset, error) {
83 83
 		return nil, err
84 84
 	}
85 85
 
86
-	info := bindataFileInfo{name: "sql/init.sql", size: 379, mode: os.FileMode(420), modTime: time.Unix(1463941605, 0)}
86
+	info := bindataFileInfo{name: "sql/init.sql", size: 379, mode: os.FileMode(436), modTime: time.Unix(1461818129, 0)}
87 87
 	a := &asset{bytes: bytes, info: info}
88 88
 	return a, nil
89 89
 }

+ 0
- 592
static.go
File diff suppressed because it is too large
View File


+ 592
- 0
static/static.go
File diff suppressed because it is too large
View File


Loading…
Cancel
Save