diff --git a/Goopfile b/Goopfile deleted file mode 100644 index 22bb031..0000000 --- a/Goopfile +++ /dev/null @@ -1,3 +0,0 @@ -github.com/tyranron/daemonigo #v0.3.1 -code.google.com/p/log4go #c3294304d93f -github.com/elazarl/go-bindata-assetfs diff --git a/Goopfile.lock b/Goopfile.lock deleted file mode 100644 index f79c80c..0000000 --- a/Goopfile.lock +++ /dev/null @@ -1,3 +0,0 @@ -code.google.com/p/log4go #c3294304d93f -github.com/elazarl/go-bindata-assetfs #fe5a90c9bd2990734f4928be5d3aeebb00f61f70 -github.com/tyranron/daemonigo #v0.3.1 diff --git a/README.md b/README.md index 22d5da1..296839b 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,10 @@ to compare different structs and as the result - to understand and remember alignment rules. ## Installing -To install correct versions of dependencies -[Goop dependency manager](https://github.com/nitrous-io/goop) should be used. ```bash go get github.com/gophergala/golang-sizeof.tips cd github.com/gophergala/golang-sizeof.tips -goop install -goop go build -o ./server +go build -o ./server ``` You may also install via simple `go get` by your own risk. diff --git a/app/app.go b/app/app.go index 9348ca8..231a094 100644 --- a/app/app.go +++ b/app/app.go @@ -1,6 +1,6 @@ package app -import "github.com/gophergala/golang-sizeof.tips/internal/log" +import "github.com/tyranron/golang-sizeof.tips/internal/log" var appLog log.Logger diff --git a/app/discover.go b/app/discover.go index a4348ea..554c1b0 100644 --- a/app/discover.go +++ b/app/discover.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "github.com/gophergala/golang-sizeof.tips/internal/parser" + "github.com/tyranron/golang-sizeof.tips/internal/parser" ) const exampleCode = `// Sample code @@ -13,10 +13,22 @@ struct { a string b bool c string + d string } ` func discoverHandler(w http.ResponseWriter, r *http.Request) { + if err := r.ParseForm(); err != nil { + toRender := &struct { + Code string + Result *viewData + Error string + }{Code: exampleCode} + toRender.Error = err.Error() + templates["index"].ExecuteTemplate(w, "base", toRender) + return + } + code := parseCodeRequestParam(r.FormValue("t")) if code == "" { code = exampleCode diff --git a/app/http.go b/app/http.go index 1d551b5..dba2e49 100644 --- a/app/http.go +++ b/app/http.go @@ -6,7 +6,7 @@ import ( "runtime" "strings" - "github.com/gophergala/golang-sizeof.tips/internal/bindata/static" + "github.com/tyranron/golang-sizeof.tips/internal/bindata/static" ) func bindHttpHandlers() { diff --git a/app/run.go b/app/run.go index 9f9386e..d4f4f60 100644 --- a/app/run.go +++ b/app/run.go @@ -8,7 +8,7 @@ import ( "syscall" "time" - "github.com/gophergala/golang-sizeof.tips/internal/log" + "github.com/tyranron/golang-sizeof.tips/internal/log" daemon "github.com/tyranron/daemonigo" ) diff --git a/app/templates.go b/app/templates.go index 376ea0e..f9d7214 100644 --- a/app/templates.go +++ b/app/templates.go @@ -3,7 +3,7 @@ package app import ( "html/template" - bin "github.com/gophergala/golang-sizeof.tips/internal/bindata/templates" + bin "github.com/tyranron/golang-sizeof.tips/internal/bindata/templates" ) const templatesDir = "templs/" diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..9d41f45 --- /dev/null +++ b/generate.go @@ -0,0 +1,3 @@ +package main + +//go:generate go-bindata -o internal/bindata/templates/bindata.go -pkg templates templs/... diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8a5bb64 --- /dev/null +++ b/go.mod @@ -0,0 +1,10 @@ +module github.com/tyranron/golang-sizeof.tips + +go 1.13 + +require ( + github.com/alecthomas/log4go v0.0.0-20180109082532-d146e6b86faa + github.com/elazarl/go-bindata-assetfs v1.0.0 + github.com/jteeuwen/go-bindata v3.0.7+incompatible // indirect + github.com/tyranron/daemonigo v0.3.1 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..912ac8d --- /dev/null +++ b/go.sum @@ -0,0 +1,8 @@ +github.com/alecthomas/log4go v0.0.0-20180109082532-d146e6b86faa h1:0zdYOLyuQ3TWIgWNgEH+LnmZNMmkO1ze3wriQt093Mk= +github.com/alecthomas/log4go v0.0.0-20180109082532-d146e6b86faa/go.mod h1:iCVmQ9g4TfaRX5m5jq5sXY7RXYWPv9/PynM/GocbG3w= +github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= +github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/jteeuwen/go-bindata v3.0.7+incompatible h1:91Uy4d9SYVr1kyTJ15wJsog+esAZZl7JmEfTkwmhJts= +github.com/jteeuwen/go-bindata v3.0.7+incompatible/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= +github.com/tyranron/daemonigo v0.3.1 h1:kLt7oKl2AceLdPl6qaXOYQZM4ZZLhT9jWrZa02iq2PQ= +github.com/tyranron/daemonigo v0.3.1/go.mod h1:tXUGvLFtBWBCpYfzgvLNuHZ4NhuwSjyNcs4gsXWZw8k= diff --git a/internal/bindata/templates/bindata.go b/internal/bindata/templates/bindata.go index 529571c..16dc962 100644 --- a/internal/bindata/templates/bindata.go +++ b/internal/bindata/templates/bindata.go @@ -5,12 +5,7 @@ import ( "compress/gzip" "fmt" "io" - "io/ioutil" - "os" - "path" - "path/filepath" "strings" - "time" ) func bindata_read(data []byte, name string) ([]byte, error) { @@ -30,147 +25,53 @@ func bindata_read(data []byte, name string) ([]byte, error) { return buf.Bytes(), nil } -type asset struct { - bytes []byte - info os.FileInfo -} - -type bindata_file_info struct { - name string - size int64 - mode os.FileMode - modTime time.Time -} +var _templs_404_tmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xce\x31\x6a\xc4\x30\x10\x46\xe1\x5e\xa7\xf8\x33\xbd\xad\x18\x5c\xca\x6a\xd3\xe5\x0e\x63\x6b\x1c\x09\x92\x91\x91\x85\x13\x10\xba\x7b\x20\x4d\x16\xb3\xf5\x2b\xbe\xd7\x1a\x82\xec\x49\x05\x54\xf3\x41\xbd\x1b\x17\xd2\x85\xed\x93\xcf\x73\x21\xe5\x6b\xe5\x32\x44\xe1\x20\x85\xbc\x01\x00\xc7\xb7\xba\x16\xd6\x40\x88\x45\xf6\x85\x2c\xf9\xb7\x8c\x9a\xf1\xc5\x49\x71\xf0\x87\x8c\xe3\xe8\x2c\x7b\xe3\x6c\x48\x97\x37\xad\x41\x34\xa0\x77\xf3\x40\x6f\x59\xab\x68\x25\xdc\xfc\x92\xbf\x51\xe5\xa7\x0e\x9b\x68\xfd\x3f\x88\x93\x9f\x5f\x67\xbc\xe7\x3f\x00\x51\x8a\xbc\x38\x1b\xa7\x27\xc8\x6f\x00\x00\x00\xff\xff\xa7\xe2\x48\x80\xe0\x00\x00\x00") -func (fi bindata_file_info) Name() string { - return fi.name -} -func (fi bindata_file_info) Size() int64 { - return fi.size -} -func (fi bindata_file_info) Mode() os.FileMode { - return fi.mode -} -func (fi bindata_file_info) ModTime() time.Time { - return fi.modTime -} -func (fi bindata_file_info) IsDir() bool { - return false -} -func (fi bindata_file_info) Sys() interface{} { - return nil -} - -var _templs_404_tmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x64\xce\xb1\x8e\x83\x30\x0c\xc6\xf1\x3d\x4f\xf1\x9d\x77\xc8\x9d\xc4\x18\xb2\xde\x76\xef\x60\x88\xb9\x20\xb5\x0e\x0a\x11\xad\x84\x78\xf7\x46\x5d\x5a\x51\x8f\xfe\x4b\xfe\x79\xdf\x11\x64\x9a\x55\x40\x25\x2d\x74\x1c\xc6\x85\x79\xc3\x78\xe1\x75\xed\x49\x79\x1b\x38\x37\x51\x38\x48\x26\x6f\x50\xc7\xf1\xa9\x0e\x99\x35\x10\x62\x96\xa9\x27\x4b\xfe\x37\xa1\x24\x5c\x79\x56\x2c\xfc\x2f\x6d\xdb\x3a\xcb\xde\x38\x5b\x0f\x7b\x53\x41\xd1\x80\x0a\xbd\xd1\x63\xd2\x22\x5a\x08\x27\x3f\xa7\x1b\x8a\xdc\x4b\x33\xd6\xfa\xfa\x20\xfe\xf8\xee\xbb\xc3\x5f\x7a\x02\x88\x92\xe5\xcb\xd9\xba\xfd\x44\x1e\x01\x00\x00\xff\xff\xa7\xe2\x48\x80\xe0\x00\x00\x00") - -func templs_404_tmpl_bytes() ([]byte, error) { +func templs_404_tmpl() ([]byte, error) { return bindata_read( _templs_404_tmpl, "templs/404.tmpl", ) } -func templs_404_tmpl() (*asset, error) { - bytes, err := templs_404_tmpl_bytes() - if err != nil { - return nil, err - } - - info := bindata_file_info{name: "templs/404.tmpl", size: 224, mode: os.FileMode(420), modTime: time.Unix(1422213114, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _templs_500_tmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x5c\xce\xb1\x6e\x84\x30\x0c\x06\xe0\x3d\x4f\xe1\x7a\x3f\xb8\x0e\xdd\x72\x59\x3b\x76\xe8\x13\xf8\x88\x21\x91\x8a\x8d\x42\x04\x95\x10\xef\x5e\xd3\xe5\x10\x19\xe3\x5f\xff\xf7\x6f\x1b\x44\xee\xb3\x30\x60\xd5\x09\xf7\xdd\xf9\x98\x17\xe8\x7e\x68\x9e\x1f\x28\xb4\x3c\xa9\xdc\x12\x53\xe4\x82\xc1\x81\x3d\x4f\x97\xeb\xb3\x90\x44\x84\x54\xb8\x7f\x60\x8b\xe1\x53\xa1\x2a\x8c\x94\x05\x26\x1a\xb8\x69\x1a\xdf\x52\x70\xbe\xb5\xe2\xe0\x0c\x64\x89\x60\xd0\x89\xee\x54\x2a\x4b\xc5\xe3\xdb\x84\xd3\x82\xa2\x2b\x54\xfe\xad\xb7\xce\xee\xaf\x0d\xe9\x3d\x7c\xdc\xef\xf0\xa5\xd3\xfc\x06\xdf\x3a\x72\x4d\x59\x06\x58\x2d\x04\x6b\x51\x19\xfe\x55\x4b\x1d\x75\x57\xf8\x2f\x00\x00\xff\xff\x87\x29\x86\x5a\xf4\x00\x00\x00") +var _templs_500_tmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\xce\x31\x6e\xc3\x30\x0c\x85\xe1\x5d\xa7\x78\xe5\x1e\x3b\x19\xba\x39\x5a\x3b\x76\xe8\x09\x18\x8b\xb1\x04\x34\xa4\x21\x13\x76\x01\x43\x77\x2f\xd2\xa5\x46\xbb\x92\x0f\xf8\xfe\x7d\x47\x92\x7b\x51\x01\xb9\xcd\xd4\x5a\x18\x52\x59\x31\x7e\xf2\xb2\x5c\x49\x79\xbd\x71\x3d\x65\xe1\x24\x95\x62\x00\x80\x81\xff\x7c\x6f\x95\x35\x11\x72\x95\xfb\x95\x7a\x8a\x6f\x06\x37\x3c\xb8\x28\x66\x9e\xa4\xeb\xba\xa1\xe7\x18\x86\x3e\x95\x35\x86\x7d\x87\x68\x42\x6b\xe1\x40\x8f\xa6\x2e\xea\xf4\x3c\x03\xc7\x82\x6a\x1b\x5c\xbe\xfc\x34\x8a\xfa\x6f\x43\xbe\xc4\xd7\xf3\x19\xef\x36\x2f\x2f\xf8\xb0\x87\x78\x2e\x3a\x61\x13\x75\x6c\xd5\x74\xfa\x51\xf3\xe5\x39\xff\x07\x7f\x07\x00\x00\xff\xff\x87\x29\x86\x5a\xf4\x00\x00\x00") -func templs_500_tmpl_bytes() ([]byte, error) { +func templs_500_tmpl() ([]byte, error) { return bindata_read( _templs_500_tmpl, "templs/500.tmpl", ) } -func templs_500_tmpl() (*asset, error) { - bytes, err := templs_500_tmpl_bytes() - if err != nil { - return nil, err - } - - info := bindata_file_info{name: "templs/500.tmpl", size: 244, mode: os.FileMode(420), modTime: time.Unix(1422213163, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _templs_index_tmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x56\x5f\x6f\xdb\x36\x10\x7f\xcf\xa7\xb8\x6a\x01\x6a\x6f\xb5\x84\xb6\x41\x1f\x32\x5b\x43\xd0\xb5\x40\x1f\x16\x14\x4b\x31\x60\x18\xf6\x40\x53\x94\xc5\x84\x22\x55\x92\x8a\xa3\x75\xfd\xee\xbb\x23\x25\x59\x72\xbc\xa1\xdd\x80\x05\x08\x4c\xf2\x8e\x77\xbf\xfb\xdd\x1f\xf1\xd3\x27\x28\x44\x29\xb5\x80\xc4\x9b\x26\xf9\xfc\xf9\x6c\x5d\xc8\x7b\xe0\x8a\x39\xb7\x49\x34\xbb\xdf\x32\xbb\xaa\x04\x2b\x84\x4d\xf2\x33\x80\xf5\xb6\xf5\xde\x68\xf0\x5d\x23\x36\x49\xdc\x24\x83\xfa\xd6\x6b\xc0\xff\x95\xd4\xa5\x49\x40\x16\x9b\xc4\x55\xcc\x8a\x04\x9c\xef\x14\xaa\x17\xd2\x35\x8a\x75\x97\xda\x68\x91\xe4\x37\x24\x5b\x67\xd1\xc6\x17\xdb\x76\x2d\xe7\xc2\xb9\x68\x7e\x67\x92\xfc\xca\xdd\x41\x25\xeb\x27\x33\x4b\xec\x28\x82\xad\x65\xba\x48\xa0\xb2\xa2\xdc\x24\x59\x92\x7f\xa8\x04\xec\x4c\x53\x09\x0b\x5b\xa1\xcc\x1e\xf6\x52\x29\x10\x0f\x08\x4f\x6a\xe8\x4c\x6b\x03\x0a\x70\xf2\x0f\x91\xa6\xe9\x3a\x63\xf9\xd9\x3a\x43\x66\xf2\x33\x64\x4c\xe8\x02\x90\xa9\x09\x77\xdc\x68\x2f\xb4\x4f\xe0\x88\x40\x6b\xf6\x91\xb6\xc9\x19\x37\x6a\x55\x17\xab\x57\x51\x50\xbd\xc8\x5b\xed\x58\x29\xd2\x1b\xf4\x65\xca\xc5\x3a\xc3\x23\x94\xd0\xdf\xf4\x5a\x84\x9b\x0c\xa2\x5e\x48\x2c\x88\x42\x7a\x83\x12\xc4\x93\xbe\x36\x85\x40\x10\x3d\xd6\x51\xd5\xd5\x4c\xa9\xfc\xda\x78\xf1\x04\xae\x74\x07\xba\xad\xb7\xc2\x3a\xd8\x09\x2d\x2c\xf3\xa2\x80\x6d\x07\xbe\x92\x0e\x58\xd3\x28\xc9\x99\x97\x98\x08\xcc\x0f\x78\xdb\x0a\x30\x5a\x75\x50\x1a\x0b\x0f\xaf\x2e\xf0\x94\x57\xd2\x0b\xee\x5b\x2b\x1c\x52\x13\x6d\x0f\x88\x07\xc7\x18\xd8\x18\xb0\x32\x4e\xea\x5d\x92\x2f\x87\xd8\x0e\x5a\x27\x78\x01\x34\xdb\x2a\xef\xfa\x50\x67\x74\x46\x09\x16\x98\x0e\x54\x60\xc4\xb2\x84\xf4\x8d\xb5\x88\x0d\xa9\x7f\xcc\xda\xd6\xad\x38\xc2\x33\xad\x87\xc3\x72\x55\x30\xbd\x9b\x73\x59\x5d\xe4\xef\x99\x25\x98\x20\xc8\x1a\x22\xbd\x98\x88\x9b\x40\xee\xe0\x67\x9d\x35\x47\xf1\x52\x51\x28\x27\xfa\xaa\xd8\x4b\x5f\x41\xfa\x73\x00\x3b\x81\x55\xbd\xcc\x3f\x0c\x45\x75\x09\x64\x30\xa6\x3c\x58\x44\xe1\x10\xce\x3b\xf7\x56\x3e\x88\xe2\x6b\x02\x0a\x1d\x37\x0f\xe7\x0d\x15\xb3\x0e\x89\x7c\x14\xcc\xaf\x63\x81\x63\xc6\x09\xc8\x35\xab\x09\x3c\x60\x97\x00\x53\x7b\xd6\x39\xa8\x98\x83\x32\xe0\x20\xbc\xc5\x33\xd0\x06\x6a\xe6\x3d\xb6\x4c\x85\x0d\x23\x3d\xec\x51\x23\x36\x40\x91\x9e\xa6\x64\xec\x93\x18\xd6\x95\xb5\xac\xfb\xbf\xc2\x62\xc1\x19\x05\x24\xbd\x0b\x31\x84\x53\x68\xac\x29\x5a\xee\x01\x79\x27\x81\x12\x7a\x87\xd9\x0a\x29\xa3\x7d\xab\x71\xd4\xa9\x8e\x0a\xe1\x30\x01\x26\xd1\x05\x47\x6f\x8d\xad\x5b\xc5\x2e\x61\xcd\xb1\xdf\xf2\xbe\x73\x7f\xbb\xfe\x9d\xf2\xbb\x84\x0d\x5c\xc3\xb7\xd0\x9f\x86\xa3\x75\x16\x14\xbf\x88\xa5\x1b\x6c\x39\xee\xff\x03\x4d\xff\xcc\x13\xe1\x3f\x6c\x00\x66\xa4\xb9\xe8\x7b\xc6\x5a\x21\x1a\x84\xe8\x70\x08\x84\xc4\x1f\x11\xe4\x60\x2f\xac\x18\xeb\x60\x6a\xf9\xc3\xde\xf4\x06\x5d\xe4\xd7\x51\x95\x95\x52\x28\xb4\x86\xc3\x1a\x0a\x59\x96\x78\x59\x63\x32\x2c\x1a\xc5\xf2\xea\xb0\xec\xee\xc5\x44\x40\x08\xdc\xcc\x2a\xd1\x4a\xc9\xeb\xa1\x22\x68\x6e\x5a\x4d\x23\x8c\x71\x8e\x76\x10\x18\x0e\xab\xe0\xaf\x61\x05\x6d\xfb\xaa\x96\x3b\x5d\x93\x49\xdb\xaa\x99\xc9\x93\x49\xa1\x54\xfc\x28\x3c\x93\xca\xcd\x3b\xb8\xcf\xce\x68\x2e\x36\xf2\x15\x6d\x27\x9d\xfc\x38\x73\x9e\x6d\x95\x58\xed\x2d\x6b\xc6\x4c\xad\xc3\xd9\x34\x33\xde\xce\x52\xb3\xf6\x55\xfe\x36\xd0\xb5\xce\x70\x79\x2c\x22\xa7\x04\xe1\x48\x88\x5b\x1b\x62\xb0\x34\xe5\xe0\x1c\xbf\x41\x70\xb9\x39\x11\xce\x23\x87\x6b\x5f\xd0\x9c\xa3\x1b\xc3\x44\x40\x63\xc5\xb1\x0a\x6e\x49\x0b\x3b\x87\xec\x06\xed\xd7\x55\xab\xef\x1c\xfc\x49\xed\x14\x1d\x1c\xfc\xcb\x67\x70\xce\xab\x63\xd5\x1e\x45\xa4\x9a\x12\xb4\xd8\xf9\x68\xf3\x62\x09\x8b\x56\xdf\x4b\xc7\x49\x13\xef\x87\xe3\xe5\xe4\xc6\x30\x6a\x23\xa4\xbf\x31\x21\x3e\xd2\xd5\x17\x74\x8f\xbe\xe0\x5b\x9b\xe5\x8f\xae\x4e\x61\x96\xf8\x02\xc0\x22\x22\x98\xbc\x4a\x5f\x0b\x35\xa7\xea\x38\x9f\xbc\xd2\x77\xd1\x33\xa9\xbf\x73\xef\xfb\x5a\xc3\x21\x8a\x65\x37\xb6\x75\x54\xd1\xc6\x8f\x0e\x50\x41\xd4\x8d\xef\x46\x95\x24\x3f\xfa\x5a\x1f\x66\xc2\xcc\x39\x45\x70\x76\x4a\x63\xba\x3b\x75\xf7\x54\x0e\x23\xae\x29\x61\x01\xeb\x79\xcc\x1f\x78\xe3\x99\x1a\x6d\xcd\x0d\x8c\xf5\x35\x73\x84\xa7\xd3\x6a\x3e\x1e\x6f\xb3\x39\xf7\x68\x35\xb9\x31\x2e\x86\x1f\xc7\xad\x6c\x70\x10\x58\xbe\x49\x2a\xef\x1b\x77\x99\x65\xbc\xd0\xb7\x2e\xc5\x77\x45\x5b\x94\x0a\x5f\x29\x29\x37\x75\xc6\x6e\xd9\x43\xa6\xe4\xd6\x65\xb7\x1f\x5b\x61\xbb\xec\x45\xfa\x3c\x7d\xd9\x6f\xd2\x5a\xea\xf4\x16\x9f\x8d\xf1\x71\xe9\xc5\x83\xcf\x6e\xd9\x3d\x8b\xd6\x29\x05\x71\xf5\xef\x1c\x32\x2e\xb2\xe7\xc1\x1b\xae\xbe\xca\x4d\xe4\xeb\x7c\x51\xb6\x9a\xd3\xac\x5e\x2c\xe1\xd3\xc8\xf4\x3d\xb3\x10\x1f\x77\xf8\x49\x21\xcb\xb4\x59\x0c\xef\xbd\xe5\xf7\xa3\x62\x3c\x49\x9d\xf0\xf8\xb0\xad\xc5\x22\x21\x40\x9e\x96\x59\x6d\xb4\xb9\x63\xf2\x84\xf6\x4e\xf8\x1b\x7c\x49\x07\xa7\x74\xf5\x27\xfc\x42\xc5\x9b\x35\xae\xb2\x9d\xc1\xef\xc7\x6e\x7a\xef\x7c\x91\x7c\x83\x2f\xee\x25\xf2\x20\xf9\xdd\x69\xc8\xf4\xb7\x97\xba\xc0\x46\x57\x26\x3e\x23\x53\x7a\x75\x63\x00\x4f\x7f\xf0\x9b\xa7\xf0\xdd\x20\xde\x7a\xc3\x16\xa7\xa0\xe0\xe6\x17\xa6\x5a\xb1\x58\x2e\x47\xb3\x9f\x7b\x18\xf4\x7b\xe0\xf0\x50\x40\x7f\x05\x00\x00\xff\xff\xc8\x9a\x0a\xdb\xc7\x0c\x00\x00") +var _templs_index_tmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x57\x41\x6f\xdb\x3a\x12\x3e\xd7\xbf\x62\xca\xcd\xc1\x5e\xd4\x12\x9a\x06\x3d\xa4\xb2\x80\xa0\xdb\x02\x3d\x6c\xb6\xd8\x04\x0b\x2c\x16\x7b\xa0\xc4\x91\xc9\x84\x22\x55\x92\xb2\xe3\xfa\xf9\xbf\x3f\x8c\x28\x2b\x92\xe3\xf7\xd0\xf6\xf0\x7a\x89\xc8\x99\xf9\xe6\x9b\x6f\x86\x34\xbb\xdf\x83\xc0\x4a\x19\x04\x16\x6c\xc3\x0e\x87\x59\x26\xd4\x06\x4a\xcd\xbd\x5f\x31\xc3\x37\x05\x77\x4b\x89\x5c\xa0\x63\xf9\x0c\x20\x2b\xda\x10\xac\x81\xb0\x6b\x70\xc5\xe2\x82\x1d\xdd\x8b\x60\xa0\x08\x66\xa9\x4c\x65\x19\x28\xb1\x62\x5e\x72\x87\x0c\x7c\xd8\x69\x5c\x31\xa1\x7c\xa3\xf9\xee\xda\x58\x83\x2c\xbf\x23\x5b\x96\x46\x8c\x1f\xc6\xf6\x6d\x59\xa2\xf7\x11\x7e\x6d\x59\x7e\xe3\x1f\x41\xaa\xfa\xf5\x04\x89\x9f\x54\x50\x38\x6e\x04\x03\xe9\xb0\x5a\xb1\x94\xe5\xf7\x12\x61\x6d\x1b\x89\x0e\x0a\xd4\x76\x0b\x5b\xa5\x35\xe0\x53\xa3\xb9\x32\xb0\xb3\xad\xeb\x58\x80\x57\xdf\x31\x49\x92\x2c\xe5\xf9\x2c\x4b\x85\xda\xe4\xb3\xfd\x1e\xd0\x08\x38\x1c\x66\x23\xed\x4a\x6b\x02\x9a\xc0\xe0\x44\x40\x67\xb7\x51\xb6\xd1\x5e\x69\xf5\xb2\x16\xcb\xf7\xd1\x20\x2f\xf3\xd6\x78\x5e\x61\x72\xa7\xbe\xa3\xad\xe6\x59\x2a\x2f\xc9\x42\xff\xc6\x61\x91\x2e\x3b\x9a\x7a\x23\xa9\x80\x42\x05\xeb\x58\xbe\xdf\x43\xf2\xd1\x0a\x84\xc3\xa1\xe7\x3a\xb8\xfa\x9a\x6b\x9d\xdf\xda\x80\xaf\xe1\xc6\xec\xc0\xb4\x75\x81\xce\xc3\x1a\x0d\x3a\x1e\x50\x40\xb1\x83\x20\x95\x07\xde\x34\x5a\x95\x3c\x28\x6b\x80\x3b\x84\xe0\x5a\x04\x6b\xf4\x0e\x2a\xeb\xe0\xe9\xfd\x15\x70\x57\x4a\x15\xb0\x0c\xad\x43\x9f\x64\x69\xc4\x3e\x32\x3e\x26\xce\xe4\xe5\x50\xb0\xb6\x5e\x99\x35\xcb\x17\xc7\xda\x9e\xbd\xce\xe8\x02\x0e\x7d\xab\x83\xef\x4b\x9d\xc8\x19\x2d\x4b\x65\x4c\x27\xc5\x7e\x0f\xaa\x82\xe4\x93\x73\xd6\x91\xf4\x2f\x55\x2b\xfc\xb2\xe4\x5a\xdb\x36\xc0\xf3\xe7\x52\x70\xb3\x9e\x6a\x29\xaf\xf2\xaf\xdc\x11\x4d\x40\x42\xcb\x52\x79\x35\x32\x37\x9d\xb8\xc7\x3c\x59\xda\x9c\xd4\x4b\x43\xa1\x3d\xf6\x53\xb1\x55\x41\x42\xf2\xef\x8e\xec\x88\x96\x7c\x97\xdf\x1f\x87\xea\x1a\x08\x30\xb6\xbc\x43\x94\xef\x86\x72\xbe\xf8\xcf\xea\x09\xc5\xcf\x14\xd4\x9d\xb8\x69\x39\x9f\x68\x98\x4d\xd7\xc8\x17\xc5\xfc\x77\x18\x70\xe5\x3b\x22\xb7\xbc\x26\xf2\xc0\x8d\x00\xae\xb7\x7c\xe7\x41\x72\x0f\x55\xc7\x83\xf8\x8a\x37\x60\x2c\xd4\x3c\x04\x74\x20\xed\x16\x54\x80\x2d\xf7\xfd\x01\x10\xc9\x79\x49\x86\x73\x12\xcb\xba\x71\x8e\xef\xfe\xaa\xb2\x78\x97\x8c\x0a\x52\xc1\x77\x35\x74\xbb\xd0\x38\x2b\xda\x32\x80\xad\x3a\x83\x46\xb3\x0e\x32\xb6\x8c\xd6\xad\x11\xe8\xf4\x8e\x06\xe1\xf9\x06\x18\x55\xd7\x25\xfa\x6c\x5d\xdd\x6a\x7e\x0d\x59\x69\x05\xe6\xfd\xc9\xfd\xdf\xed\xff\xa9\xbf\x0b\x58\xc1\x2d\xfc\x1d\xfa\xdd\x6e\x2b\x4b\x3b\xc7\x1f\x52\xe9\x2e\x38\xe2\xf7\xeb\x32\xfd\xb9\x4e\xc4\xff\x79\x01\x30\x11\xcd\xc7\xdc\x13\xd5\x04\x36\x68\x84\x07\x6b\xba\xc6\x9f\x08\xe4\x61\x8b\x0e\x87\x39\x18\x23\xdf\x6f\x6d\x0f\xe8\xa3\xbe\x9e\xa6\xac\x52\xa8\x85\x87\xa2\x0d\x20\x54\x55\xa1\x43\x13\xc0\x3a\x81\x0e\x6a\xbe\x03\xc9\x37\x38\x32\x10\x03\x3f\x41\x25\x59\xa9\x79\x3d\x55\xe5\xa1\xb4\xad\xa1\x2b\x8c\x97\xa5\x75\x42\x99\xb5\xde\xc5\x7c\x0d\x17\xb4\xec\xa7\x5a\xad\x4d\x4d\x90\xae\xd5\x13\xc8\xb3\x4d\xa1\x56\xfc\x03\x03\x57\xda\x4f\x4f\x70\xdf\x9d\x01\x2e\x1e\xe4\x1b\x5a\x8e\x4e\xf2\xcb\xce\x05\x5e\x68\x5c\x6e\x1d\x6f\x86\x4e\x65\xdd\xde\xb8\x33\xc1\x4d\x5a\x93\x05\x99\x7f\xee\xe4\xca\xd2\x20\x5f\x98\x28\x29\x51\x38\x31\x66\x29\xc1\xec\xf7\xe0\xe8\x96\x83\x0b\x67\xb7\x70\xbd\x3a\x53\xce\x8b\x84\x59\x10\x74\xcf\x51\xc4\xf1\x46\xc8\xd2\x20\x4e\x5d\x66\x40\x35\x5f\x68\x34\x84\xdb\x79\x7f\x94\xad\x79\xf4\xf0\x1b\x1d\xa7\x98\xe0\x39\xbf\x7a\x03\x17\xa5\x3c\x75\xed\x59\x44\xa9\xa9\x41\xf3\x75\x88\x98\x57\x0b\x98\xb7\x66\xa3\x7c\x49\x9e\x70\xa1\xba\xed\xc5\x28\xe2\x78\xd5\x46\x4a\x7f\x00\x81\xdf\x28\xf4\x92\xe2\xe8\x17\xbc\x70\x69\xfe\x22\x74\x4c\xb3\x52\x5a\xa3\xe8\x68\x96\x32\xf9\x88\x7a\x2a\xd5\x69\x3f\x4b\x69\x1e\x63\x66\x72\xff\xe2\xbf\xf6\xb3\x76\x38\xd0\xd8\x0d\xc7\x3a\xba\x18\x1b\x86\x04\x87\x03\x60\xdd\x84\xdd\xe0\xc2\xf2\x93\x5f\xeb\xe7\x3b\x61\x92\x9c\x2a\x98\x9d\xf3\x18\xaf\xce\xc5\x9e\xeb\x61\xe4\x35\x16\xac\xe3\x7a\x11\xfb\x07\xc1\x06\xae\x07\xac\x29\xc0\x30\x5f\x93\x44\x59\x3a\x99\xe6\xd3\xeb\x6d\x72\xcf\xbd\xf8\x82\xc9\xcb\x21\x7e\x1c\xff\xf8\xd2\xa9\x26\x80\x77\xe5\x8a\xc9\x10\x1a\x7f\x9d\xa6\xa5\x30\x0f\x3e\x29\xb5\x6d\x45\xa5\xb9\xc3\xa4\xb4\x75\xca\x1f\xf8\x53\xaa\x55\xe1\xd3\x87\x6f\x2d\xba\x5d\x7a\x99\xbc\x4d\xde\xf5\x8b\xa4\x56\x26\x79\xf0\xac\x7f\x5c\x06\x7c\x0a\xe9\x03\xdf\xf0\x88\x4e\x2d\x88\x5f\xbf\x96\x90\x97\x98\xbe\xed\xb2\xf1\x12\x7f\x2a\x4d\xd4\xeb\x62\x5e\xb5\xa6\xa4\xbb\x7a\xbe\x80\xfd\xa0\xf4\x86\x3b\x88\x8f\x3b\x58\x01\x21\xd3\x62\x7e\x7c\xef\x2d\x3e\x0c\x8e\x71\x27\xf1\x18\xee\x25\xd6\x38\x67\x44\x28\xd0\x67\x5a\x5b\x63\x1f\xb9\x3a\xe3\xbd\xc6\x70\x87\xde\x77\x49\x29\xf4\x9f\x56\xf4\x91\xb5\x15\x98\xae\xad\xe6\x66\x3d\x8e\xbb\x98\xb3\xbf\xad\x2d\x5b\x24\xa5\x56\xe5\xe3\x94\xf2\xab\x57\x64\x0d\x6c\x91\x6c\xb8\x9e\x6f\x95\x11\x76\x9b\x14\xc1\xf2\xf9\xb9\x6c\x6b\x0c\xff\xe1\xba\xc5\xf9\x62\xb1\xf8\xd0\xc7\x56\xd6\xd5\x4b\x25\xd8\x22\xf1\x6d\x51\xab\x30\x1f\x65\x3e\xf4\xdf\xf4\x77\x24\x21\x85\x74\x2f\xe0\x63\x2c\xf0\x8e\x11\x3d\xf1\xa1\xc6\x20\xad\x58\xb1\xaf\xff\xba\xbb\x67\xf9\x2c\x53\xa6\x69\x43\xdf\x17\xa9\x84\x40\x13\xff\x0f\x11\x18\x18\x5e\x53\xb3\xc8\x2b\x25\xa8\xf1\x74\xff\x1e\x00\x00\xff\xff\x8e\xd4\xe5\x60\x21\x0d\x00\x00") -func templs_index_tmpl_bytes() ([]byte, error) { +func templs_index_tmpl() ([]byte, error) { return bindata_read( _templs_index_tmpl, "templs/index.tmpl", ) } -func templs_index_tmpl() (*asset, error) { - bytes, err := templs_index_tmpl_bytes() - if err != nil { - return nil, err - } - - info := bindata_file_info{name: "templs/index.tmpl", size: 3271, mode: os.FileMode(420), modTime: time.Unix(1422216135, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _templs_parts_base_tmpl = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x55\xdd\x6e\xdc\x36\x13\xbd\xdf\xa7\xa0\x75\xf1\xad\xf6\x83\x24\x66\xe3\xb8\x49\xba\xd2\x02\x4e\x6c\x18\x41\x81\xa4\x17\x2e\xd0\x62\xb1\x28\xb8\xd4\x48\xa2\x4d\x91\x0a\x49\xad\xbc\xb5\xf7\x51\x7a\xd7\x27\xeb\x93\x74\x28\xed\x5f\xea\xc2\xc8\x8d\x28\xce\xcc\x39\x33\x1c\xf2\x90\x8f\x8f\x24\x87\x42\x28\x20\xc1\x8a\x59\x08\xc8\x76\x3b\x4a\xcf\xae\xbe\x7c\xbc\xfd\xed\xe7\x6b\x52\xb9\x5a\xce\x47\xa9\x1f\x88\x64\xaa\xcc\x02\x50\x81\x37\x00\xcb\xe7\x23\x42\xd2\x1a\x1c\x23\xbc\x62\xc6\x82\xcb\x82\xd6\x15\xf1\xbb\xe0\xe8\xa8\x9c\x6b\x62\xf8\xda\x8a\x75\x16\xfc\x1a\xff\x72\x19\x7f\xd4\x75\xc3\x9c\x58\x49\x4c\xc4\xb5\x72\xa0\x10\xf5\xe9\x3a\x83\xbc\x84\x13\x9c\x62\x35\x64\xc1\x5a\x40\xd7\x68\xe3\x4e\x42\x3b\x91\xbb\x2a\xcb\x61\x2d\x38\xc4\xfd\x24\x22\x42\x09\x27\x98\x8c\x2d\x67\x12\xb2\xe9\x33\x9a\x1c\x2c\x37\xa2\x71\x42\xab\x13\xa6\x4b\x7b\x4f\x4a\xdd\x54\x60\x08\x5b\xe9\xd6\x11\xeb\x4c\xcb\x71\x10\x7f\xc0\xd9\x33\x8e\x7b\xd8\x74\xda\xe4\xf6\x84\xa0\xd4\xbe\x21\xd1\x09\x2c\xf2\x1f\x5d\x3c\x03\xb3\xd6\x55\xda\x9c\x40\xaf\xea\x8d\x33\x9a\xfc\xa4\xd7\x4c\x92\xd0\x6d\x0c\x53\x46\xab\x09\x02\x3d\xd2\x09\x27\x61\x7e\xd3\xd3\x93\x81\x92\x38\xd1\xd8\x94\x0e\x9e\x3e\x48\x0a\x75\x4f\x0c\xc8\x2c\xb0\xc8\xed\x38\x2e\x40\x70\xbf\xc0\xca\x40\x91\x05\x54\xd4\xac\x04\x4b\x0b\xb6\xf6\xe6\x04\x3f\xc1\x33\xa0\xdb\x48\xb0\x15\x80\xdb\xa3\xfc\x76\xd9\x1f\x29\xad\xd9\x03\xcf\x55\xb2\xd2\xda\xe1\xf2\x58\xe3\x27\x5c\xd7\xf4\x60\xa0\xe7\xc9\x79\xf2\x9a\x72\x6b\x8f\xb6\xa4\x16\x18\x65\xed\xb0\xfc\x97\xd2\xd0\xc1\x84\x69\x0e\x08\x0f\x39\x8b\xe3\x85\x28\x88\x74\xe4\xd3\x35\x79\xbf\xf4\x34\x68\x1d\xf6\x8e\x58\xc3\x8f\xf5\x69\x6b\x93\x5d\x8d\xbe\x2c\x7f\x3a\x2f\x6c\x25\xd6\x58\xd6\x5b\x2c\xeb\x30\xef\x4b\xba\x43\xfe\x94\x0e\x34\xdf\xcf\x69\xc0\x36\x5a\xe5\x74\x9a\xbc\x41\xc6\xdd\xec\x3f\xf9\xd2\xb3\x05\xa8\x5c\x14\xcb\x38\x46\x61\xd0\x41\x19\xe9\x4a\xe7\x9b\xde\xab\xd8\x9a\x70\xc9\xac\xcd\x02\xfc\x5d\x31\x43\x86\x21\x2e\xc4\x03\xe4\xb1\xd3\xcd\xde\x20\xd4\x1a\x50\x46\xc1\xae\xc8\x5c\x1c\x80\xfe\xe0\x60\xaf\xc0\xec\x7c\x84\xa0\x6a\x1d\xd4\x8d\x64\x0e\x75\x8b\x1c\x01\x49\xbc\x70\x7b\x20\x45\x64\x9f\x9a\x22\x71\xff\xf3\x02\xd5\x37\x44\xbb\x03\x7a\x20\x3b\x52\x15\xb8\xcb\x60\xbe\xa7\xb2\xb4\xd9\xfb\x1c\x3c\xb8\xb8\x6e\x1d\xe4\xc1\xfc\x7f\x5c\x37\x9b\x19\x79\xfd\x6a\x7a\x41\x52\xf6\xaf\xe3\x56\x0a\x57\xb5\xab\xbe\xed\x7b\x2d\x04\xc4\x31\x53\xfa\x2b\xe5\xf7\x15\xea\xe0\x3e\x98\xdf\xee\x3c\x29\x65\xd8\xfe\xe6\xe5\x74\x57\xb0\x06\xa9\x1b\xc8\x49\x87\xdc\xe4\xef\x3f\xff\x22\x85\x36\xdf\x66\xf6\x89\x7b\xfd\x97\x4c\xb2\x3e\x79\x80\xa2\xeb\x2f\x84\x1b\xb4\xf8\x3c\x67\x87\x44\x27\x4d\xdd\xb7\x22\xdd\x1f\x81\xb0\x68\x15\xf7\xb7\x4b\x28\x22\x1b\xe9\xa8\x8c\x4c\xc4\xa2\x7a\xf2\x28\x16\xe3\x1b\xad\x4b\x09\x97\x8a\xc9\x8d\x13\xdc\x7e\x59\xdd\x01\x77\xe3\x65\x66\x66\x62\x61\x96\x99\xff\x3c\x3d\x1d\xf0\x93\xc7\x51\xe8\x4d\xc9\xd7\x6c\x18\x9e\x9e\x16\xcb\x49\xd2\xb4\xb6\x0a\xb1\x1d\x6d\x8d\x9b\x63\x27\xdb\xa8\x77\xca\x6c\xfa\x7f\x05\x1d\xb9\xc2\xad\x0b\x27\x33\x96\xd9\x84\x1b\xc0\xc9\xb5\x04\x1f\x18\xea\x49\x34\xaa\xd1\x8a\x6d\xdc\x99\xec\x87\xcd\x2d\x2b\x3f\xe3\xa5\x84\xce\xc5\xab\xe5\x8c\x25\xcc\x6e\x14\xcf\xa6\xf8\xe7\xd5\x50\xce\xea\xa4\x61\x06\x43\x3f\xeb\x1c\x12\xa1\x2c\x18\xf7\x01\xb0\x77\x10\xfa\x25\x8d\xb6\x93\xb0\x13\x2a\xd7\x5d\x94\x6b\xde\xd7\x13\x8d\x87\x3e\x8c\xa3\x31\xa5\x5d\xd7\x25\x65\xbf\xe4\x98\xed\xd7\xdc\xb7\xf6\x38\xbb\xb3\x18\x59\xb2\xf1\x64\x36\x2a\x59\x38\x1e\x4a\x1e\x47\x64\x8c\xaf\xc3\xc5\xbb\xf7\x6f\xce\x2f\xde\xfe\x10\x4f\xbd\x01\xaf\x4d\xbd\x0f\xb3\x28\x31\x6f\x6b\xf0\x56\xf3\xcf\x82\xb7\x1f\x45\x98\xd2\x41\x6e\x29\x1d\xde\x2b\x3c\xd4\x18\xef\xcf\xf0\xc9\xeb\xe6\x55\xb2\xdd\x1e\x5d\xff\x04\x00\x00\xff\xff\x6e\xc7\x3d\xb2\xf9\x06\x00\x00") +var _templs_parts_base_tmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x55\xdd\x6e\xdb\x36\x14\xbe\xf7\x53\x9c\xe8\x62\xb6\x07\x49\xac\x93\x66\x6d\x67\xc9\x40\xda\x04\x41\x31\xa0\xdd\x45\x0b\x6c\x30\x8c\xe1\x98\x3a\x92\xd8\x48\xa4\x4a\x1e\xd9\xf1\x1c\x3f\xca\xee\xf6\x64\x7b\x92\x81\x52\xfc\xd3\x65\x08\x7a\x63\x9a\xdf\xe1\xf7\x9d\x1f\x9d\x43\x6e\xb7\x90\x51\xae\x34\x41\xb0\x44\x47\x01\xec\x76\x83\xe4\xec\xfa\xe3\xbb\x4f\xbf\xff\x7a\x03\x25\xd7\xd5\x6c\x90\xf8\x05\x2a\xd4\x45\x1a\x90\x0e\x3c\x40\x98\xcd\x06\x00\x49\x4d\x8c\x20\x4b\xb4\x8e\x38\x0d\x5a\xce\xa3\xd7\xc1\xd1\x50\x32\x37\x11\x7d\x6d\xd5\x2a\x0d\x7e\x8b\x3e\x5f\x45\xef\x4c\xdd\x20\xab\x65\x45\x01\x48\xa3\x99\x34\xa7\xc1\xfb\x9b\x94\xb2\x82\x4e\x78\x1a\x6b\x4a\x83\x95\xa2\x75\x63\x2c\x9f\x1c\x5d\xab\x8c\xcb\x34\xa3\x95\x92\x14\x75\x9b\x10\x94\x56\xac\xb0\x8a\x9c\xc4\x8a\xd2\xc9\x13\x99\x8c\x9c\xb4\xaa\x61\x65\xf4\x89\xd2\x95\xbb\x83\xc2\x34\x25\x59\xc0\xa5\x69\x19\x1c\xdb\x56\x32\x38\xf5\x27\x9d\x3d\xd1\xb8\xa3\xcd\xda\xd8\xcc\x9d\x08\x14\xc6\x17\x24\x3c\xa1\x85\xfe\xc7\xe4\x4f\xc8\xd8\x72\x69\xec\x09\xf5\xba\xde\xb0\x35\xf0\x8b\x59\x61\x05\x23\xde\x58\xd4\xd6\xe8\x71\x30\x1b\x78\x26\x2b\xae\x68\x76\xdb\xc9\x43\x2f\x09\xac\x1a\x97\x88\xde\xd2\x1d\xaa\x94\xbe\x03\x4b\x55\x1a\xb8\xd2\x58\x96\x2d\x83\x92\x3e\xc1\xd2\x52\x9e\x06\x42\xd5\x58\x90\x13\x39\xae\x3c\x1c\x2b\x69\x82\x27\x44\xde\x54\xe4\x4a\x22\xde\xb3\xfc\xe7\x72\x3f\x0b\x51\xe3\xbd\xcc\x74\xbc\x34\x86\x1d\x5b\x6c\xfc\x46\x9a\x5a\x1c\x00\x71\x11\x5f\xc4\xe7\x42\x3a\x77\xc4\xe2\x5a\xe9\x58\x3a\xd7\xa7\xff\x9c\x1b\xd1\x43\xa2\xc6\x03\xc3\x53\xce\xa2\x68\xae\x72\xa8\x18\xde\xdf\xc0\x9b\x85\x97\x01\x48\xfa\x6f\x07\xce\xca\x63\x7c\xc6\xb9\xf8\x31\x46\x1f\x96\xef\xce\x4b\x57\xaa\x95\xb8\x88\x5f\xc5\xe7\xc7\x7d\x17\xd2\x17\x17\xcc\x12\xd1\xcb\x7c\xbf\xa6\x25\xd7\x18\x9d\x89\x49\xfc\x32\x3e\xdf\xef\xfe\x57\x2f\x39\x9b\x93\xce\x54\xbe\x88\xa2\xd9\x20\x11\xfd\x64\x24\x4b\x93\x6d\x3a\xab\xc6\x15\xc8\x0a\x9d\x4b\x03\x8d\xab\x25\x5a\xe8\x97\x28\x57\xf7\x94\x45\x6c\x9a\x3d\xa0\xf4\x8a\xac\xeb\xc7\x00\x20\xc9\xd4\x81\xe8\x1b\x07\x95\x26\xfb\x68\x03\xd8\x6e\x81\xa9\x6e\x2a\x64\x82\x80\x4d\x13\x40\xec\x07\xb7\x23\x8a\x4c\xad\x3a\xd7\x42\x63\xff\xe7\x19\xa9\x6f\x84\x1e\x1b\xf4\x20\x76\x94\xca\x8d\x61\xb2\xdf\x13\x59\xd2\xec\x6d\x4c\xf7\x1c\xd5\x2d\x53\x16\xcc\x7e\x90\xa6\xd9\x4c\xe1\xfc\xc5\xe4\x12\x12\xfc\x4f\xbb\x15\x8a\xcb\x76\xd9\x95\x7d\x3f\x0b\x01\x30\xda\xc2\x5f\x29\x7f\x2c\x2b\xd4\x77\xc1\xec\xd3\xa3\x25\x11\x38\x4b\x44\xf3\xbc\xbb\x6b\x5a\x51\x65\x1a\xca\x60\xad\xb8\x84\x7f\xfe\xfa\x1b\x72\x63\xbf\xf5\xec\x1d\x77\xf3\x5f\x60\x85\x9d\xf3\x60\x76\xdb\x5f\x08\xb7\x58\xa1\xf7\x73\x76\x70\x74\x52\xd4\x7d\x29\x92\x7d\x0b\x8c\xf2\x56\x4b\x7f\xbb\x8c\x54\xe8\x42\x13\x16\xa1\x0d\x31\xac\xc7\x5b\x35\x1f\xde\x1a\x53\x54\x74\xa5\xb1\xda\xb0\x92\xee\xe3\xf2\x0b\x49\x1e\x2e\x52\x3b\x55\x73\xbb\x48\xfd\xcf\xc3\xc3\x81\x3f\xde\x0e\x46\x1e\x8a\xbf\xa6\xfd\xf2\xf0\x30\x5f\x8c\xe3\xa6\x75\xe5\x08\x6d\xd1\xd6\xa4\xd9\x8d\x77\x61\x67\xac\xd2\xc9\x8f\x9a\xd6\x70\x8d\x4c\xa3\xf1\x14\x53\x17\x4b\x4b\xc8\x74\x53\x91\x3f\x38\x32\xe3\x70\x50\xa7\x2e\x2e\x88\x1f\x21\xf7\x76\xf3\x09\x8b\x0f\x58\xd3\xc8\x8c\xe7\x2f\x16\x53\x8c\xd1\x6d\xb4\x4c\x27\x53\x8c\xfd\x34\x14\xd3\x3a\x6e\xd0\x92\xe6\x0f\x26\xa3\x58\x69\x47\x96\xdf\x52\x6e\x2c\x8d\x7c\x4a\x83\xdd\x78\xb4\x56\x3a\x33\xeb\x30\x33\xb2\x8b\x27\x1c\xf6\x75\x18\x86\x43\x21\xd6\xeb\x75\x5c\x74\x29\x47\xb8\xcf\xb9\x2b\xed\x71\xf7\xc5\x0d\xc3\x61\x81\xc3\xf1\x74\x50\xe0\x68\xd8\x87\x3c\x0c\x61\xf8\xf9\x2a\xba\x7c\xfd\xe6\xe5\xc5\xe5\xab\x9f\xa2\x89\x07\xb0\x65\xb3\x3f\xe6\x48\x67\x1e\x6b\xb0\x20\xff\x2c\x78\xfc\x38\x84\x89\xe8\xc7\x2d\x11\xfd\x7b\xb5\xdd\x02\xe9\xcc\xf7\xf0\xc9\xeb\xe6\xa7\x64\xb7\x3b\x9a\xfe\x0d\x00\x00\xff\xff\x6e\xc7\x3d\xb2\xf9\x06\x00\x00") -func templs_parts_base_tmpl_bytes() ([]byte, error) { +func templs_parts_base_tmpl() ([]byte, error) { return bindata_read( _templs_parts_base_tmpl, "templs/parts/base.tmpl", ) } -func templs_parts_base_tmpl() (*asset, error) { - bytes, err := templs_parts_base_tmpl_bytes() - if err != nil { - return nil, err - } - - info := bindata_file_info{name: "templs/parts/base.tmpl", size: 1785, mode: os.FileMode(420), modTime: time.Unix(1422214860, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - // Asset loads and returns the asset for the given name. // It returns an error if the asset could not be found or // could not be loaded. func Asset(name string) ([]byte, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { - a, err := f() - if err != nil { - return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) - } - return a.bytes, nil + return f() } return nil, fmt.Errorf("Asset %s not found", name) } -// AssetInfo loads and returns the asset info for the given name. -// It returns an error if the asset could not be found or -// could not be loaded. -func AssetInfo(name string) (os.FileInfo, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { - a, err := f() - if err != nil { - return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) - } - return a.info, nil - } - return nil, fmt.Errorf("AssetInfo %s not found", name) -} - // AssetNames returns the names of the assets. func AssetNames() []string { names := make([]string, 0, len(_bindata)) @@ -181,13 +82,12 @@ func AssetNames() []string { } // _bindata is a table, holding each asset generator, mapped to its name. -var _bindata = map[string]func() (*asset, error){ - "templs/404.tmpl": templs_404_tmpl, - "templs/500.tmpl": templs_500_tmpl, - "templs/index.tmpl": templs_index_tmpl, +var _bindata = map[string]func() ([]byte, error){ + "templs/404.tmpl": templs_404_tmpl, + "templs/500.tmpl": templs_500_tmpl, + "templs/index.tmpl": templs_index_tmpl, "templs/parts/base.tmpl": templs_parts_base_tmpl, } - // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the @@ -224,63 +124,20 @@ func AssetDir(name string) ([]string, error) { } type _bintree_t struct { - Func func() (*asset, error) + Func func() ([]byte, error) Children map[string]*_bintree_t } - var _bintree = &_bintree_t{nil, map[string]*_bintree_t{ "templs": &_bintree_t{nil, map[string]*_bintree_t{ - "404.tmpl": &_bintree_t{templs_404_tmpl, map[string]*_bintree_t{}}, - "500.tmpl": &_bintree_t{templs_500_tmpl, map[string]*_bintree_t{}}, - "index.tmpl": &_bintree_t{templs_index_tmpl, map[string]*_bintree_t{}}, + "404.tmpl": &_bintree_t{templs_404_tmpl, map[string]*_bintree_t{ + }}, + "500.tmpl": &_bintree_t{templs_500_tmpl, map[string]*_bintree_t{ + }}, + "index.tmpl": &_bintree_t{templs_index_tmpl, map[string]*_bintree_t{ + }}, "parts": &_bintree_t{nil, map[string]*_bintree_t{ - "base.tmpl": &_bintree_t{templs_parts_base_tmpl, map[string]*_bintree_t{}}, + "base.tmpl": &_bintree_t{templs_parts_base_tmpl, map[string]*_bintree_t{ + }}, }}, }}, }} - -// Restore an asset under the given directory -func RestoreAsset(dir, name string) error { - data, err := Asset(name) - if err != nil { - return err - } - info, err := AssetInfo(name) - if err != nil { - return err - } - err = os.MkdirAll(_filePath(dir, path.Dir(name)), os.FileMode(0755)) - if err != nil { - return err - } - err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) - if err != nil { - return err - } - err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) - if err != nil { - return err - } - return nil -} - -// Restore assets under the given directory recursively -func RestoreAssets(dir, name string) error { - children, err := AssetDir(name) - if err != nil { // File - return RestoreAsset(dir, name) - } else { // Dir - for _, child := range children { - err = RestoreAssets(dir, path.Join(name, child)) - if err != nil { - return err - } - } - } - return nil -} - -func _filePath(dir, name string) string { - cannonicalName := strings.Replace(name, "\\", "/", -1) - return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) -} diff --git a/internal/log/filelog/writer.go b/internal/log/filelog/writer.go index b30eea7..80da32d 100644 --- a/internal/log/filelog/writer.go +++ b/internal/log/filelog/writer.go @@ -15,7 +15,7 @@ import ( "sync" "time" - log "code.google.com/p/log4go" + log "github.com/alecthomas/log4go" ) // Day format for comparing files changed time during daily log rotation. diff --git a/internal/log/log.go b/internal/log/log.go index 417f7e9..cebbee2 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -4,9 +4,8 @@ import ( "fmt" "os" - "github.com/gophergala/golang-sizeof.tips/internal/log/filelog" - - l4g "code.google.com/p/log4go" + l4g "github.com/alecthomas/log4go" + "github.com/tyranron/golang-sizeof.tips/internal/log/filelog" ) // Relative path (from application root) to file diff --git a/main.go b/main.go index 409e7fe..3d5291b 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/gophergala/golang-sizeof.tips/app" + "github.com/tyranron/golang-sizeof.tips/app" ) func main() { diff --git a/templs/index.tmpl b/templs/index.tmpl index 17482c6..4207612 100644 --- a/templs/index.tmpl +++ b/templs/index.tmpl @@ -91,8 +91,12 @@ editor.setTheme("ace/theme/monokai"); editor.getSession().setMode("ace/mode/golang"); $("#go").click(function() { - window.location.href = '?t=' + window.btoa(editor.getSession().getValue()) + $("#t").val(window.btoa(editor.getSession().getValue())); + $("#form-id").submit(); }); }); +
{{ end }}