Browse Source

New DirOptions.Cache field for in-memory caching and pre-compression for the fastest possible static file server

Read HISTORY.md it contains a breaking change, second parameter of HandleDir should be iris.Dir(...) instead of just a string

relative to: https://github.com/kataras/iris/issues/1556#issuecomment-661057446


Former-commit-id: 14b48a06fb
tags/v0.0.1
Gerasimos (Makis) Maropoulos 1 year ago
parent
commit
c3205dafa1
58 changed files with 2580 additions and 9854 deletions
  1. +28
    -7
      HISTORY.md
  2. +1
    -1
      _examples/auth/cors/main.go
  3. +1
    -1
      _examples/bootstrapper/bootstrap/bootstrapper.go
  4. +2
    -2
      _examples/desktop/webview/main.go
  5. +1
    -1
      _examples/dropzonejs/README.md
  6. +1
    -1
      _examples/dropzonejs/README_PART2.md
  7. +1
    -1
      _examples/dropzonejs/src/main.go
  8. +16
    -4
      _examples/file-server/basic/main.go
  9. +2
    -1
      _examples/file-server/basic/main_test.go
  10. +134
    -37
      _examples/file-server/embedding-files-into-app/bindata.go
  11. +16
    -8
      _examples/file-server/embedding-files-into-app/main.go
  12. +0
    -7225
      _examples/file-server/embedding-gzipped-files-into-app/assets/css/bootstrap.min.css
  13. BIN
      _examples/file-server/embedding-gzipped-files-into-app/assets/favicon.ico
  14. +0
    -1
      _examples/file-server/embedding-gzipped-files-into-app/assets/js/jquery-2.1.1.js
  15. +382
    -0
      _examples/file-server/embedding-gzipped-files-into-app/bindata.go
  16. +0
    -1120
      _examples/file-server/embedding-gzipped-files-into-app/bindata_gzip.go
  17. +28
    -20
      _examples/file-server/embedding-gzipped-files-into-app/main.go
  18. +20
    -5
      _examples/file-server/embedding-gzipped-files-into-app/main_test.go
  19. +2
    -2
      _examples/file-server/file-server/main.go
  20. +580
    -0
      _examples/file-server/http2push-embedded-gzipped/bindata.go
  21. +0
    -584
      _examples/file-server/http2push-embedded-gzipped/bindata_gzip.go
  22. +23
    -32
      _examples/file-server/http2push-embedded-gzipped/main.go
  23. +217
    -120
      _examples/file-server/http2push-embedded/bindata.go
  24. +12
    -12
      _examples/file-server/http2push-embedded/main.go
  25. +7
    -2
      _examples/file-server/http2push/main.go
  26. +1
    -1
      _examples/file-server/single-page-application/basic/main.go
  27. +132
    -37
      _examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/bindata.go
  28. +4
    -15
      _examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/main.go
  29. +1
    -1
      _examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/public/app.js
  30. +161
    -138
      _examples/file-server/single-page-application/embedded-single-page-application/bindata.go
  31. +8
    -7
      _examples/file-server/single-page-application/embedded-single-page-application/main.go
  32. +1
    -1
      _examples/file-server/subdomain/main.go
  33. +1
    -1
      _examples/mvc/login-mvc-single-responsibility/main.go
  34. +1
    -1
      _examples/mvc/login/main.go
  35. +1
    -1
      _examples/mvc/vuejs-todo-mvc/README.md
  36. +1
    -1
      _examples/mvc/vuejs-todo-mvc/src/web/main.go
  37. +1
    -1
      _examples/mvc/websocket/main.go
  38. +1
    -1
      _examples/response-writer/http2push/main.go
  39. +1
    -1
      _examples/routing/custom-wrapper/main.go
  40. +3
    -3
      _examples/routing/overview/main.go
  41. +2
    -2
      _examples/routing/subdomains/multi/main.go
  42. +1
    -1
      _examples/url-shortener/main.go
  43. +1
    -1
      _examples/view/embedding-templates-into-app/main.go
  44. +1
    -1
      _examples/view/template_jet_1_embedded/README.md
  45. +1
    -1
      _examples/view/template_jet_1_embedded/main.go
  46. +1
    -1
      _examples/view/template_pug_3/main.go
  47. +1
    -1
      _examples/webassembly/main.go
  48. +1
    -1
      _examples/websocket/basic/server.go
  49. +1
    -1
      _examples/websocket/native-messages/main.go
  50. +1
    -1
      _examples/websocket/online-visitors/main.go
  51. +1
    -1
      _examples/websocket/socketio/main.go
  52. +33
    -2
      aliases.go
  53. +1
    -1
      cache/browser.go
  54. +23
    -9
      context/compress.go
  55. +14
    -7
      core/router/api_builder.go
  56. +698
    -418
      core/router/fs.go
  57. +6
    -7
      core/router/party.go
  58. +1
    -1
      view/README.md

+ 28
- 7
HISTORY.md View File

@@ -373,17 +373,38 @@ Other Improvements:
- Fix [#1553](https://github.com/kataras/iris/issues/1553).
- New `DirOptions.Cache` to cache assets in-memory among with their compressed contents (in order to be ready to served if client ask). Learn more about this feature by reading [all #1556 comments](https://github.com/kataras/iris/issues/1556#issuecomment-661057446). Usage:
```go
var dirOpts = DirOptions{
// [...other options]
Cache: DirCacheOptions{
Enable: true,
// Don't compress files smaller than 300 bytes.
CompressMinSize: 300,
// Ignore compress already compressed file types
// (some images and pdf).
CompressIgnore: iris.MatchImagesAssets,
// Gzip, deflate, br(brotli), snappy.
Encodings: []string{"gzip", "deflate", "br", "snappy"},
// Log to the stdout the total reduced file size.
Verbose: 1,
},
}
```
- New `DirOptions.PushTargets` and `PushTargetsRegexp` to push index' assets to the client without additional requests. Inspirated by issue [#1562](https://github.com/kataras/iris/issues/1562). Example matching all `.js, .css and .ico` files (recursively):
```go
var opts = iris.DirOptions{
IndexName: "/index.html",
PushTargetsRegexp: map[string]*regexp.Regexp{
var dirOpts = iris.DirOptions{
// [...other options]
IndexName: "/index.html",
PushTargetsRegexp: map[string]*regexp.Regexp{
"/": regexp.MustCompile("((.*).js|(.*).css|(.*).ico)$"),
// OR:
// "/": iris.MatchCommonAssets,
},
Compress: true,
// "/": iris.MatchCommonAssets,
},
Compress: true,
}
```
@@ -492,7 +513,7 @@ Breaking Changes:
- `iris.Gzip` and `iris.GzipReader` replaced with `iris.Compression` (middleware).
- `ctx.ClientSupportsGzip() bool` replaced with `ctx.ClientSupportsEncoding("gzip", "br" ...) bool`.
- `ctx.GzipResponseWriter()` is **removed**.
- `Party.HandleDir` now returns a list of `[]*Route` (GET and HEAD) instead of GET only.
- `Party.HandleDir/iris.FileServer` now accepts a `http.FileSystem` instead of a string and returns a list of `[]*Route` (GET and HEAD) instead of GET only. Write: `app.HandleDir("/", iris.Dir("./assets"))` instead of `app.HandleDir("/", "./assets")` and `DirOptions.Asset, AssetNames, AssetInfo` removed, use `go-bindata -fs [..]` and `app.HandleDir("/", AssetFile())` instead.
- `Context.OnClose` and `Context.OnCloseConnection` now both accept an `iris.Handler` instead of a simple `func()` as their callback.
- `Context.StreamWriter(writer func(w io.Writer) bool)` changed to `StreamWriter(writer func(w io.Writer) error) error` and it's now the `Context.Request().Context().Done()` channel that is used to receive any close connection/manual cancel signals, instead of the deprecated `ResponseWriter().CloseNotify()` one. Same for the `Context.OnClose` and `Context.OnCloseConnection` methods.
- Fixed handler's error response not be respected when response recorder was used instead of the common writer. Fixes [#1531](https://github.com/kataras/iris/issues/1531). It contains a **BREAKING CHANGE** of: the new `Configuration.ResetOnFireErrorCode` field should be set **to true** in order to behave as it used before this update (to reset the contents on recorder).


+ 1
- 1
_examples/auth/cors/main.go View File

@@ -41,7 +41,7 @@ func main() {
app.WrapRouter(c.ServeHTTP)

// Serve ./public/index.html, main.js.
app.HandleDir("/", "./public")
app.HandleDir("/", iris.Dir("./public"))

// Register routes here...
app.Get("/data", listData)


+ 1
- 1
_examples/bootstrapper/bootstrap/bootstrapper.go View File

@@ -108,7 +108,7 @@ func (b *Bootstrapper) Bootstrap() *Bootstrapper {

// static files
b.Favicon(StaticAssets + Favicon)
b.HandleDir(StaticAssets[1:len(StaticAssets)-1], StaticAssets)
b.HandleDir("/public", iris.Dir(StaticAssets))

// middleware, after static files
b.Use(recover.New())


+ 2
- 2
_examples/desktop/webview/main.go View File

@@ -2,7 +2,7 @@ package main

import (
"github.com/kataras/iris/v12"
"github.com/zserge/webview"
"github.com/webview/webview"
)

const addr = "127.0.0.1:8080"
@@ -18,7 +18,7 @@ const addr = "127.0.0.1:8080"
#
#
# Note: if you see "use option -std=c99 or -std=gnu99 to compile your code"
# please refer to: https://github.com/zserge/webview/issues/188
# please refer to: https://github.com/webview/webview/issues/188
*/
func main() {
go runServer()


+ 1
- 1
_examples/dropzonejs/README.md View File

@@ -101,7 +101,7 @@ func main() {
app.RegisterView(iris.HTML("./views", ".html"))

// Make the /public route path to statically serve the ./public/... contents
app.HandleDir("/public", "./public")
app.HandleDir("/public", iris.Dir("./public"))

// Render the actual form
// GET: http://localhost:8080


+ 1
- 1
_examples/dropzonejs/README_PART2.md View File

@@ -168,7 +168,7 @@ func main() {
app := iris.New()
app.RegisterView(iris.HTML("./views", ".html"))

app.HandleDir("/public", "./public")
app.HandleDir("/public", iris.Dir("./public"))

app.Get("/", func(ctx iris.Context) {
ctx.View("upload.html")


+ 1
- 1
_examples/dropzonejs/src/main.go View File

@@ -121,7 +121,7 @@ func main() {
app := iris.New()
app.RegisterView(iris.HTML("./views", ".html"))

app.HandleDir("/public", "./public")
app.HandleDir("/public", iris.Dir("./public"))

app.Get("/", func(ctx iris.Context) {
ctx.View("upload.html")


+ 16
- 4
_examples/file-server/basic/main.go View File

@@ -12,11 +12,11 @@ func newApp() *iris.Application {
// first parameter is the request path
// second is the system directory
//
// app.HandleDir("/css", "./assets/css")
// app.HandleDir("/js", "./assets/js")
// app.HandleDir("/css", iris.Dir("./assets/css"))
// app.HandleDir("/js", iris.Dir("./assets/js"))

v1 := app.Party("/v1")
v1.HandleDir("/static", "./assets", iris.DirOptions{
v1.HandleDir("/static", iris.Dir("./assets"), iris.DirOptions{
// Defaults to "/index.html", if request path is ending with **/*/$IndexName
// then it redirects to **/*(/) which another handler is handling it,
// that another handler, called index handler, is auto-registered by the framework
@@ -26,7 +26,19 @@ func newApp() *iris.Application {
Compress: false,
// List the files inside the current requested directory if `IndexName` not found.
ShowList: false,
// If `ShowList` is true then this function will be used instead of the default one to show the list of files of a current requested directory(dir).
Cache: iris.DirCacheOptions{
// enable in-memory cache and pre-compress the files.
Enable: true,
// ignore image types (and pdf).
CompressIgnore: iris.MatchImagesAssets,
// do not compress files smaller than size.
CompressMinSize: 300,
// available encodings that will be negotiated with client's needs.
Encodings: []string{"gzip", "br" /* you can also add: deflate, snappy */},
},
DirList: iris.DirListRich(),
// If `ShowList` is true then this function will be used instead of the default
// one to show the list of files of a current requested directory(dir).
// DirList: func(ctx iris.Context, dirName string, dir http.File) error { ... }
//
// Optional validator that loops through each requested resource.


+ 2
- 1
_examples/file-server/basic/main_test.go View File

@@ -6,6 +6,7 @@ import (
"strings"
"testing"

"github.com/kataras/iris/v12"
"github.com/kataras/iris/v12/httptest"
)

@@ -98,7 +99,7 @@ func TestHandleDirDot(t *testing.T) {
"/v1/assets.system/css/main.css",
}
app := newApp()
app.Subdomain("test").Party("/v1").HandleDir("/assets.system", "./assets.system")
app.Subdomain("test").Party("/v1").HandleDir("/assets.system", iris.Dir("./assets.system"))

e := httptest.New(t, app, httptest.URL("http://test.example.com"))
for _, u := range urls {


+ 134
- 37
_examples/file-server/embedding-files-into-app/bindata.go
File diff suppressed because it is too large
View File


+ 16
- 8
_examples/file-server/embedding-files-into-app/main.go View File

@@ -5,8 +5,8 @@ import (
)

// Follow these steps first:
// $ go get -u github.com/go-bindata/go-bindata/...
// $ go-bindata ./assets/...
// $ go get -u github.com/go-bindata/go-bindata/v3/go-bindata
// $ go-bindata -prefix "assets" -fs ./assets/...
// $ go run .
// "physical" files are not used, you can delete the "assets" folder and run the example.
//
@@ -15,13 +15,21 @@ func newApp() *iris.Application {
app := iris.New()
app.Logger().SetLevel("debug")

app.HandleDir("/static", "./assets", iris.DirOptions{
Asset: Asset,
AssetInfo: AssetInfo,
AssetNames: AssetNames,
ShowList: true,
})
app.HandleDir("/static", AssetFile())

/*
Or if you need to cache them inside the memory (requires the assets folder
to be located near the executable program):
app.HandleDir("/static", http.Dir("./assets"), iris.DirOptions{
IndexName: "index.html",
Cache: iris.DirCacheOptions{
Enable: true,
Encodings: []string{"gzip"},
CompressIgnore: iris.MatchImagesAssets,
CompressMinSize: 30 * iris.B,
},
})
*/
return app
}



+ 0
- 7225
_examples/file-server/embedding-gzipped-files-into-app/assets/css/bootstrap.min.css
File diff suppressed because it is too large
View File


BIN
_examples/file-server/embedding-gzipped-files-into-app/assets/favicon.ico View File

Before After

+ 0
- 1
_examples/file-server/embedding-gzipped-files-into-app/assets/js/jquery-2.1.1.js View File

@@ -1 +0,0 @@
console.log("example");

+ 382
- 0
_examples/file-server/embedding-gzipped-files-into-app/bindata.go
File diff suppressed because it is too large
View File


+ 0
- 1120
_examples/file-server/embedding-gzipped-files-into-app/bindata_gzip.go
File diff suppressed because it is too large
View File


+ 28
- 20
_examples/file-server/embedding-gzipped-files-into-app/main.go View File

@@ -4,31 +4,39 @@ import (
"github.com/kataras/iris/v12"
)

// NOTE: need different tool than the "embedding-files-into-app" example.
// How to run:
//
// Follow these steps first:
// $ go get -u github.com/kataras/bindata/cmd/bindata
// $ bindata ./assets/...
// $ go get -u github.com/go-bindata/go-bindata/v3/go-bindata
// $ go-bindata -prefix "../embedding-files-into-app/assets/" -fs ../embedding-files-into-app/assets/...
// $ go run .
// $ ./embedding-gzipped-files-into-app
// "physical" files are not used, you can delete the "assets" folder and run the example.
// Time to complete the compression and caching of [2/3] files: 31.9998ms
// Total size reduced from 156.6 kB to:
// br (22.9 kB) [85.37%]
// snappy (41.7 kB) [73.37%]
// gzip (27.9 kB) [82.16%]
// deflate (27.9 kB) [82.19%]

var dirOptions = iris.DirOptions{
IndexName: "index.html",
// The `Compress` field is ignored
// when the file is cached (when Cache.Enable is true),
// because the cache file has a map of pre-compressed contents for each encoding
// that is served based on client's accept-encoding.
Compress: true, // true or false does not matter here.
Cache: iris.DirCacheOptions{
Enable: true,
CompressIgnore: iris.MatchImagesAssets,
// Here, define the encodings that the cached files should be pre-compressed
// and served based on client's needs.
Encodings: []string{"gzip", "deflate", "br", "snappy"},
CompressMinSize: 50, // files smaller than this size will NOT be compressed.
Verbose: 1,
},
}

func newApp() *iris.Application {
app := iris.New()

// Note the `GzipAsset` and `GzipAssetNames` are different from go-bindata's `Asset`,
// do not set the `Compress` option to true, instead
// use the `AssetValidator` option to manually set the content-encoding to "gzip".
app.HandleDir("/static", "./assets", iris.DirOptions{
Asset: GzipAsset,
AssetInfo: GzipAssetInfo,
AssetNames: GzipAssetNames,
AssetValidator: func(ctx iris.Context, name string) bool {
// ctx.Header("Vary", "Accept-Encoding")
ctx.Header("Content-Encoding", "gzip")
return true
},
})
app.HandleDir("/static", AssetFile(), dirOptions)
return app
}



+ 20
- 5
_examples/file-server/embedding-gzipped-files-into-app/main_test.go View File

@@ -70,7 +70,9 @@ var urls = []resource{
// and secondly if the HandleDir had successfully registered
// the routes and gave the correct response.
func TestEmbeddingGzipFilesIntoApp(t *testing.T) {
dirOptions.Cache.Verbose = 0
app := newApp()

e := httptest.New(t, app)

if runtime.GOOS != "windows" {
@@ -81,17 +83,25 @@ func TestEmbeddingGzipFilesIntoApp(t *testing.T) {

for i, u := range urls {
url := u.String()
rawContents := u.loadFromBase("./assets")
rawContents := u.loadFromBase("../embedding-files-into-app/assets")
shouldBeCompressed := int64(len(rawContents)) >= dirOptions.Cache.CompressMinSize

response := e.GET(url).Expect()
request := e.GET(url)
if shouldBeCompressed {
request.WithHeader("Accept-Encoding", "gzip")
}
response := request.Expect()
response.ContentType(u.contentType(), app.ConfigurationReadOnly().GetCharset())
response.ContentEncoding("gzip")
if shouldBeCompressed {
response.ContentEncoding("gzip")
}

if expected, got := response.Raw().StatusCode, httptest.StatusOK; expected != got {
t.Fatalf("[%d] of '%s': expected %d status code but got %d", i, url, expected, got)
}
rawBody := response.Body().Raw()

func() {
if shouldBeCompressed {
reader, err := gzip.NewReader(strings.NewReader(rawBody))
defer reader.Close()
if err != nil {
@@ -105,6 +115,11 @@ func TestEmbeddingGzipFilesIntoApp(t *testing.T) {
// they are big files, no need to check for length here.
t.Fatalf("[%d] %s, expected body to look like: '%s...%s' but got '%s...%s'", i, url, expected[:40], expected[len(rawContents)-40:], got[:40], got[len(got)-40:])
}
}()
} else {
if expected, got := rawContents, rawBody; expected != got {
t.Fatalf("[%d] %s, expected body to look like: '%s...%s' but got '%s...%s'", i, url, expected[:40], expected[len(rawContents)-40:], got[:40], got[len(got)-40:])
}
}

}
}

+ 2
- 2
_examples/file-server/file-server/main.go View File

@@ -44,7 +44,7 @@ func main() {
app.RegisterView(view)

// Serve assets (e.g. javascript, css).
// app.HandleDir("/public", "./public")
// app.HandleDir("/public", iris.Dir("./public"))

app.Get("/", index)

@@ -53,7 +53,7 @@ func main() {

filesRouter := app.Party("/files")
{
filesRouter.HandleDir("/", uploadDir, iris.DirOptions{
filesRouter.HandleDir("/", iris.Dir(uploadDir), iris.DirOptions{
Compress: true,
ShowList: true,



+ 580
- 0
_examples/file-server/http2push-embedded-gzipped/bindata.go
File diff suppressed because it is too large
View File


+ 0
- 584
_examples/file-server/http2push-embedded-gzipped/bindata_gzip.go View File

@@ -1,584 +0,0 @@
// Code generated by bindata. DO NOT EDIT.
// sources:
// ..\http2push\assets\app2\app2app3\css\main.css
// ..\http2push\assets\app2\app2app3\dirs\dir1\text.txt
// ..\http2push\assets\app2\app2app3\dirs\dir2\text.txt
// ..\http2push\assets\app2\app2app3\dirs\text.txt
// ..\http2push\assets\app2\app2app3\index.html
// ..\http2push\assets\app2\index.html
// ..\http2push\assets\app2\mydir\text.txt
// ..\http2push\assets\css\main.css
// ..\http2push\assets\favicon.ico
// ..\http2push\assets\index.html
// ..\http2push\assets\js\main.js

package main

import (
"fmt"
"os"
"strings"
"time"
)

type gzipAsset struct {
bytes []byte
info gzipFileInfoEx
}

type gzipFileInfoEx interface {
os.FileInfo
MD5Checksum() string
}

type gzipBindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
md5checksum string
}

func (fi gzipBindataFileInfo) Name() string {
return fi.name
}
func (fi gzipBindataFileInfo) Size() int64 {
return fi.size
}
func (fi gzipBindataFileInfo) Mode() os.FileMode {
return fi.mode
}
func (fi gzipBindataFileInfo) ModTime() time.Time {
return fi.modTime
}
func (fi gzipBindataFileInfo) MD5Checksum() string {
return fi.md5checksum
}
func (fi gzipBindataFileInfo) IsDir() bool {
return false
}
func (fi gzipBindataFileInfo) Sys() interface{} {
return nil
}

var _gzipBindataAssetsapp2app2app3cssmaincss = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xca\x4f\xa9\x54\xa8\xe6\xe5\x52\x50\x50\x50\x48\x4a\x4c\xce\x4e\x2f" +
"\xca\x2f\xcd\x4b\xd1\x4d\xce\xcf\xc9\x2f\xb2\x52\x48\xca\x29\x4d\xb5\xe6\xe5\xaa\x05\x04\x00\x00\xff\xff\x52\xd7" +
"\xbb\x8b\x26\x00\x00\x00")

func gzipBindataAssetsapp2app2app3cssmaincss() (*gzipAsset, error) {
bytes := _gzipBindataAssetsapp2app2app3cssmaincss
info := gzipBindataFileInfo{
name: "assets/app2/app2app3/css/main.css",
size: 38,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1595043712, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsapp2app2app3dirsdir1texttxt = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x2c\x28\x30\xd2\x07\x11\x89\x05\x05\xc6\xfa\x29\x99\x45\xc5\x20\xc2" +
"\x50\xbf\x24\xb5\xa2\x44\xaf\xa4\xa2\x04\x10\x00\x00\xff\xff\x87\xaf\x9d\x00\x20\x00\x00\x00")

func gzipBindataAssetsapp2app2app3dirsdir1texttxt() (*gzipAsset, error) {
bytes := _gzipBindataAssetsapp2app2app3dirsdir1texttxt
info := gzipBindataFileInfo{
name: "assets/app2/app2app3/dirs/dir1/text.txt",
size: 32,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1594843207, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsapp2app2app3dirsdir2texttxt = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x2c\x28\x30\xd2\x07\x11\x89\x05\x05\xc6\xfa\x29\x99\x45\xc5\x20\xc2" +
"\x48\xbf\x24\xb5\xa2\x44\xaf\xa4\xa2\x04\x10\x00\x00\xff\xff\x84\x14\xaa\xeb\x20\x00\x00\x00")

func gzipBindataAssetsapp2app2app3dirsdir2texttxt() (*gzipAsset, error) {
bytes := _gzipBindataAssetsapp2app2app3dirsdir2texttxt
info := gzipBindataFileInfo{
name: "assets/app2/app2app3/dirs/dir2/text.txt",
size: 32,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1594843207, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsapp2app2app3dirstexttxt = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x2c\x28\x30\xd2\x07\x11\x89\x05\x05\xc6\xfa\x29\x99\x45\xc5\xfa\x25" +
"\xa9\x15\x25\x7a\x25\x15\x25\x80\x00\x00\x00\xff\xff\x64\xfe\x96\xd6\x1b\x00\x00\x00")

func gzipBindataAssetsapp2app2app3dirstexttxt() (*gzipAsset, error) {
bytes := _gzipBindataAssetsapp2app2app3dirstexttxt
info := gzipBindataFileInfo{
name: "assets/app2/app2app3/dirs/text.txt",
size: 27,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1594843207, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsapp2app2app3indexhtml = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x90\x3f\x4f\xc3\x40\x0c\xc5\xf7\x48\xf9\x0e\xc6\x33\xed\x91\x76\x61" +
"\xb8\x8b\x54\xf1\x47\x6c\x30\x94\x81\xf1\x7a\x31\x9c\x85\x73\x39\xe5\x4c\x4b\xbf\x3d\x4a\x68\x90\x58\x6c\x3d\xfb" +
"\xbd\x9f\x64\xdb\xab\xfb\xe7\xbb\xfd\xdb\xcb\x03\x44\xed\xa5\xad\x2b\x3b\x75\x10\x9f\x3e\x1c\x52\xc2\xb6\xae\xa6" +
"\x19\xf9\xae\xad\x2b\x00\x00\xdb\x93\x7a\x08\xd1\x8f\x85\xd4\xe1\xeb\xfe\x71\x75\x8b\xff\x76\xc9\xf7\xe4\xf0\xc8" +
"\x74\xca\xc3\xa8\x08\x61\x48\x4a\x49\x1d\x9e\xb8\xd3\xe8\x3a\x3a\x72\xa0\xd5\x2c\xae\x81\x13\x2b\x7b\x59\x95\xe0" +
"\x85\x5c\xb3\xbe\xf9\x63\x09\xa7\x4f\x18\x49\x1c\x16\x3d\x0b\x95\x48\xa4\x08\x71\xa4\x77\x87\x26\x7f\x1d\x84\x83" +
"\xf1\x39\x6f\xe6\xe2\x73\xde\x9a\x50\x8a\xe9\x3d\xa7\x75\x28\x05\xc1\x2c\x20\x65\x15\x6a\x77\x39\x6f\x76\x39\x6f" +
"\xad\xf9\xd5\x75\x65\xcd\xe5\xac\xba\xb2\x87\xa1\x3b\x2f\xfe\xd8\xb4\x4f\x24\x32\xc0\x12\x01\x4e\x1d\x7d\x5b\x13" +
"\x9b\x39\x75\xf1\xce\x80\xe9\x67\x3f\x01\x00\x00\xff\xff\xef\x25\x54\xc8\x43\x01\x00\x00")

func gzipBindataAssetsapp2app2app3indexhtml() (*gzipAsset, error) {
bytes := _gzipBindataAssetsapp2app2app3indexhtml
info := gzipBindataFileInfo{
name: "assets/app2/app2app3/index.html",
size: 323,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1595043725, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsapp2indexhtml = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb2\xc9\x30\xb4\xf3\x48\xcd\xc9\xc9\x57\x70\x2c\x28\x30\x52\xc8\xcc\x4b" +
"\x49\xad\xb0\xd1\xcf\x30\xb4\x03\x04\x00\x00\xff\xff\x75\x17\xab\xfa\x19\x00\x00\x00")

func gzipBindataAssetsapp2indexhtml() (*gzipAsset, error) {
bytes := _gzipBindataAssetsapp2indexhtml
info := gzipBindataFileInfo{
name: "assets/app2/index.html",
size: 25,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1565946440, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsapp2mydirtexttxt = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xca\x2a\x2d\x2e\x51\x48\x54\x28\x49\xad\x28\xd1\x03\x04\x00\x00\xff\xff" +
"\x2f\xf9\x22\x98\x0c\x00\x00\x00")

func gzipBindataAssetsapp2mydirtexttxt() (*gzipAsset, error) {
bytes := _gzipBindataAssetsapp2mydirtexttxt
info := gzipBindataFileInfo{
name: "assets/app2/mydir/text.txt",
size: 12,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1594787248, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetscssmaincss = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xca\x4f\xa9\x54\xa8\xe6\xe5\x52\x50\x50\x50\x48\x4a\x4c\xce\x4e\x2f" +
"\xca\x2f\xcd\x4b\xd1\x4d\xce\xcf\xc9\x2f\xb2\x52\x48\xca\x49\x4c\xce\xb6\xe6\xe5\xaa\xe5\xe5\x02\x04\x00\x00\xff" +
"\xff\x03\x25\x9c\x89\x29\x00\x00\x00")

func gzipBindataAssetscssmaincss() (*gzipAsset, error) {
bytes := _gzipBindataAssetscssmaincss
info := gzipBindataFileInfo{
name: "assets/css/main.css",
size: 41,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1565946440, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsfaviconico = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x0b\x70\x55\xc7\x79\xde\x7b\xce\x45\x12\xb2\x90\xc4\xc3\xe6\x61" +
"\x3b\x90\xf8\x31\xc4\x19\x6c\x32\xe3\xc4\x34\xe3\xc6\x34\x6d\xed\xd4\x69\x62\x32\x49\x9a\xa6\x75\xea\x36\x33\xee" +
"\xd8\x9e\xb4\x75\xdc\x7a\xa6\xc5\x31\x02\xa6\xd3\x84\x47\x28\x6f\x3b\xc6\x3c\xcc\xeb\x9e\xbd\x08\x21\x04\x92\x28" +
"\x12\x0e\x08\x5b\x3c\xec\x02\x92\x78\x08\x21\x09\x41\x25\x24\x10\xe8\x71\xb5\xe7\xdc\xd7\xb9\xf7\xef\xfc\xff\x9e" +
"\x73\x74\x25\xdd\x97\x24\x82\x33\x1e\xce\xcc\x3f\x7b\xee\x9e\xdd\xff\xff\xf6\xdf\x7f\xff\xfd\xf7\xdf\xcb\x98\x8b" +
"\xa9\x2c\x3f\x1f\xcb\x19\xec\x15\x37\x63\x5f\x67\x8c\xcd\x98\x21\x7f\x6b\xf9\x8c\x6d\x72\x33\x36\x7b\xb6\xf5\xfb" +
"\x11\xc6\x9e\xbd\x97\xb1\x99\x8c\xb1\x7c\x6c\xc7\x64\x3d\x3d\x6e\x76\xdb\x1f\xe1\x75\xab\x42\x53\x7e\x22\x3c\x6c" +
"\x91\xf0\xb0\x02\x22\xae\x14\x08\x8f\xab\x40\xec\x64\x92\xf0\x5d\x53\xfe\x59\xec\x64\x5f\x15\x1e\xa6\x08\x4f\x7f" +
"\x7f\xdf\x7a\x96\xa1\x97\x3c\xb8\x3f\x78\xfa\x0d\x08\x9e\x5d\x08\xc1\xda\x5f\x82\x51\xf6\x65\x30\xca\x67\x41\xf0" +
"\xcc\xbf\x11\x19\x07\x1e\x07\xbd\x78\x2a\x18\x65\x8f\xb5\x0b\x4d\x7d\xad\x6f\x07\x73\x0b\xcd\x45\xfd\xbb\x17\xb3" +
"\x0c\xa3\x62\xce\xfe\xa8\xd1\x0a\xf8\x98\x6d\x25\x10\x38\xfe\x53\x88\xdc\x3a\x01\x66\x6b\x11\x11\xbe\x07\x8e\xfd" +
"\x2d\x84\x2e\x2c\x05\xff\xd1\x79\x3d\xc2\xc3\x7e\x20\x78\x06\x13\x5c\x89\xe9\xdf\x06\xd1\x50\x2f\x04\x4e\xfc\x0c" +
"\xcc\x6b\xa5\x60\x1c\xfd\x21\x74\x6c\x1e\x47\x84\xef\x58\x17\xf8\xe4\x65\x30\x6f\x54\x81\x71\xe0\x89\xea\xbe\x2d" +
"\x6c\xd2\x80\xfe\xfe\x76\x30\x6f\x1c\x81\x60\xed\x7c\x08\x9e\x5d\x0c\x2d\xeb\xc7\x41\xed\xd2\x29\x50\xbb\x74\x32" +
"\xbd\x63\x1d\x7e\xc3\x36\xa1\x73\xff\x19\x14\x1e\x36\x4f\x78\xc7\xc4\xf4\xef\x80\x70\xd3\xfb\x10\x6e\x5c\x0f\xdd" +
"\x65\x73\xe1\xdc\xf2\x89\xd0\xb1\x25\x0f\x6e\x7c\x90\x07\xe7\x7f\x33\x81\xea\xf0\x5b\xb8\x79\x13\x61\xd0\x8b\xa7" +
"\x2c\x09\x7c\xfc\x57\xac\x7b\x11\xf6\x7f\x6a\x5f\xd4\xb8\x06\xa1\xfa\x15\x10\x6e\x7a\x0f\x3a\xb4\xc7\xa0\x61\x55" +
"\x3e\x04\x8f\xfc\x39\x84\x3e\xfa\x4b\x68\x5c\x93\x4f\x75\xf8\x2d\x74\x71\x05\x44\x45\x13\xea\x54\xeb\x7c\x85\xa9" +
"\x48\xf8\x1e\x15\xcd\xf4\xcd\xee\x7f\x71\x65\x3e\x04\x3e\x7c\x86\x78\x5c\x5a\x1d\xd3\xbf\x7e\x05\xa0\x2c\x94\x89" +
"\xb2\x03\xd5\x3f\x66\x88\x05\x31\x21\x36\x1b\xff\xd9\xe5\x13\xe1\xda\xc6\x5c\x68\xdf\x94\x4b\x63\x71\xf0\x37\xbd" +
"\x0f\x38\x56\x1c\x33\x8e\x1d\x75\x80\xba\x40\x9d\x0c\xd6\x5f\xcd\x92\x29\x44\x83\xf5\x87\xba\x76\xfa\x73\x85\xe1" +
"\x5c\x18\x07\x9e\x38\x86\x18\x68\x8e\xac\xf9\xbb\xbe\x39\x87\xc8\x99\xbf\x13\x3f\xa3\x39\xc6\xb9\x8e\xed\x4f\xb6" +
"\xe0\x61\x3f\x40\xdb\x40\x1b\x41\x5b\x19\x62\x3f\xc7\x7f\x4a\xb6\x85\x0f\xda\x9a\xdd\x9f\xd6\x80\xe6\x62\xd2\x26" +
"\xd5\xd7\xd0\x46\xc9\x56\x0f\x3c\xde\x6f\xbf\xe5\xb3\xc8\xa6\xd1\xb6\xc9\xc6\x4f\xbf\x01\x68\xf3\x68\xfb\xce\x3a" +
"\xf2\x30\x26\x76\x32\x85\xd6\x08\xae\x95\xc1\xeb\x87\xd6\x14\xb3\x69\x11\xad\x39\xaf\x5b\x1d\xed\xfa\x05\x60\x8c" +
"\x65\x32\xc6\x54\x8b\x5c\x31\x64\x3d\x0b\x63\xe8\xb0\x45\x2d\x56\xdf\x99\x96\x8f\x99\x1b\xeb\x67\xf2\x47\x8b\xea" +
"\xf3\xf9\x08\xae\x22\xe5\x09\xae\x4e\x17\x5c\xfd\xc2\x28\x69\x8a\xe0\xca\x58\xb4\x3d\xdb\x17\xa6\x29\xff\x5f\x04" +
"\x57\x5b\x85\xe6\xba\x92\x90\xb8\x1a\x43\x4a\x4c\xbd\x62\xd7\xb7\x08\xae\xd6\x0b\xae\xfe\x8f\xe0\xea\x9b\x38\x1e" +
"\x1f\x1f\x4b\xfe\x34\xb5\x7c\xa5\x40\xec\xca\x02\xbd\x64\x3a\xe8\xfb\xbe\x38\x94\x4a\xa6\x83\xf0\x66\x82\xd0\x14" +
"\x10\x9a\x0b\x44\xe1\x38\x5c\x2b\x44\xf8\x4e\x75\x5c\x01\xe1\x75\x03\xf2\x11\x9a\x2b\x2a\xb8\x52\x2b\xb8\x3a\x4f" +
"\x68\x8a\x92\x0c\x03\xc9\xf7\xb0\x02\xa3\xfc\x2b\x10\xe9\xae\x85\xa8\x7e\x15\xa2\xfa\x95\x18\xba\x0a\xa1\xb3\x8b" +
"\x49\xbe\xbe\xe7\x5e\x08\xfe\xef\x3f\x81\xd9\x51\x09\x91\xbe\x4b\x44\xf8\x8e\x75\xf8\x4d\x70\x37\x04\x3e\xfe\x11" +
"\xf9\x14\xbd\x68\x3c\xe2\xe8\x14\x5c\x7d\x49\x78\x99\x2b\x11\x06\x47\xfe\x81\xd9\x10\x0d\xde\x82\xc1\x8f\x79\xe3" +
"\x30\xe8\x7b\xa7\x81\x51\xfa\x28\x98\xd7\xca\x00\xa2\xa6\xfc\x80\x65\xcc\x3b\x7e\xc3\x36\xfa\xde\x07\x08\x93\xd9" +
"\x5a\x0c\xfa\xfe\x87\x41\x68\xac\x43\x70\xf5\x59\x92\xe3\x1d\xea\x1a\x92\xc9\x8f\x06\x3a\xc1\xff\xe1\x5c\xda\x67" +
"\x91\x27\x3e\x91\xde\x0b\xe4\xaf\xfc\x47\x5f\x20\xc2\x77\xac\x23\xac\x1d\x95\xd4\xd6\xff\xe1\x9f\x10\x2f\xfa\x5d" +
"\xf2\x05\xc4\x70\x4c\x70\xf5\x7e\x94\x35\x1c\xf9\xa1\xc6\x77\x68\x3e\x43\x17\x57\x4a\xfe\xe8\xc3\xcb\xbe\x8c\xfc" +
"\xa0\xcf\x23\x09\xdf\xb1\x0e\xbf\x51\x9f\x8b\x2b\x65\x9f\xc6\x77\xe8\x37\xee\x4f\x62\xd7\x58\xb4\x8f\x05\x3e\x9e" +
"\x35\xc4\x1e\x13\xc9\x8f\x06\xbb\xc0\xa8\xfc\x23\xf0\x1f\xfa\x63\x88\x86\xba\x21\x72\xeb\x24\x18\xfb\x1f\x82\xde" +
"\x1d\x2e\x68\xdd\x30\x0e\x1a\x56\x4f\x24\xc2\x77\xac\xc3\x6f\xd8\x06\xdb\x62\x1f\xec\x8b\xef\x10\xd6\xc1\xff\xd1" +
"\xf7\x11\x67\x83\xe0\xea\x97\x06\xeb\x20\x91\x7c\xd2\xdd\xee\x3c\x08\x37\x6f\x04\x30\x0d\x08\x7c\x34\x8f\xe4\x34" +
"\xae\x99\x00\xa7\x7f\x3d\x0d\x4e\xfd\xea\x7e\x22\x7c\xc7\x3a\xfc\x86\x6d\xb0\x6d\xb8\x69\x23\xf5\xb5\xe7\xcc\x6c" +
"\x3f\x00\x62\x77\x6e\x54\x68\xae\x57\xad\xf5\x96\x52\x7e\xb0\x6e\x01\xe8\xfb\x66\xd0\x1a\x30\xaf\x95\x83\x28\xcc" +
"\x81\x2b\xef\xe6\x92\x3c\x24\x8a\x63\x96\x4d\x71\x7e\xe3\x37\x6c\x83\x6d\xb1\x0f\xf6\x0d\xd6\x15\x48\x5d\x86\x7c" +
"\x64\x47\xc2\xc3\xf6\x0a\xae\x66\xc6\xea\x20\xae\xfc\x48\x08\xfc\x55\xdf\x05\x7f\xd5\x77\x00\x22\x41\x08\x7e\xfa" +
"\x2a\x74\x6d\x53\xa1\x6e\xf9\x64\x92\x75\x69\xcd\x44\xb8\xb9\x35\x13\x6e\x6d\xcb\x80\xe6\x75\xe3\xa9\x0e\xbf\x61" +
"\x1b\x6c\x8b\x7d\xb0\xaf\xbf\xea\x7b\xc4\x8b\xec\xe2\xec\x22\x9c\x83\x66\xc1\xd5\x19\xa9\xe4\xd3\xdc\x1f\x98\x0d" +
"\xc1\x33\x6f\x42\x34\xec\x03\x7f\xe5\x1c\x68\xdb\x30\x96\xe4\x9c\xfb\xcd\x7d\xd0\xbd\x63\x0c\xe8\x85\x63\x41\x2f" +
"\xbc\x07\x7a\x3d\x6e\xa8\x5f\x39\x89\xbe\x61\x1b\x6c\x8b\x7d\xb0\xaf\xe4\xd9\x65\xd9\x6e\x19\x88\x5d\xd9\xba\xd0" +
"\x5c\x73\x53\xca\xd7\xff\x0f\xf4\xfd\x0f\x41\xa8\x61\x35\xf9\x1f\x7d\xdf\x74\x68\x5e\x97\x47\xf3\xdd\xf2\x4e\x1e" +
"\xc9\x0d\x9f\xfc\x3b\x30\x4f\xbd\x02\xc6\x9e\x09\xd0\xba\x21\x07\x4e\xfd\x6a\x1a\xb5\xc1\xb6\xe4\xb3\x1a\x56\x13" +
"\x0f\xe4\x25\xd7\xed\x39\x5c\x9b\x51\xa1\xb1\x17\xe3\xc8\x7f\x0b\x63\x13\x5c\xef\xd4\xb6\xaf\x91\x7c\x6b\xf8\xf2" +
"\x16\x5a\xdb\x62\xcf\x64\xb8\xb4\x7a\x3c\xc9\x68\xdb\x90\x0d\xfe\xb2\x87\x01\x2e\x2d\x07\x68\x5a\x05\x81\xca\x27" +
"\xe1\xfa\xe6\x4c\x39\x2f\xab\xc7\x53\xdb\x88\xaf\x9e\xfa\x22\x0f\xe4\xe5\xc4\x47\xa5\x8f\xa2\x0d\xfc\x22\x8e\xfc" +
"\x5f\xe0\x37\x3b\x5e\x4f\x2e\xff\x1e\xf0\x97\x7e\x11\xa2\x0d\x4b\x00\x9a\x56\x42\xe0\xe0\x13\x70\x7d\x53\x56\x6a" +
"\xf9\x81\x4e\x8a\xbf\x70\xac\x43\xe4\x6b\xec\x45\xd4\x0d\xea\x28\xbe\xfe\x67\x38\xfa\x6f\x5e\x97\x2f\xfd\xcb\xd1" +
"\xe7\x21\x74\xec\x87\xa0\xef\xce\x81\xab\xbf\x1d\x67\x7d\xcb\xb3\xd6\xcc\x50\xfd\xe3\xdc\xe2\x1c\xcb\xb3\xd0\x60" +
"\xf9\xae\xb9\x68\x1b\xe4\xdf\x53\xd8\x1f\xda\x39\xda\xbe\xee\x55\x41\xf7\xba\xc9\x16\xcf\xaf\xb8\x2f\xa5\xfd\x25" +
"\x95\x8f\x6b\x42\x63\xcd\xb8\xcf\x25\x5c\x7f\x5b\xe5\xfa\xc3\x39\xb8\xf0\xdf\xf7\x42\xfb\xc6\x7b\xa0\x63\x53\x36" +
"\x5c\x5c\x35\x29\xad\xf5\x97\x42\x7e\x26\xfa\x06\xda\x37\xc2\xbe\xb4\xfc\x0f\xd2\x99\x25\xd3\xd2\xf2\x3f\xc9\xe5" +
"\x2b\xf6\x1c\xbc\x86\x3e\x12\x7d\xe5\x50\xff\xeb\x8f\xe3\x7f\x25\x0d\xf5\xbf\xfe\x21\xfe\x37\x99\xfc\x18\x1d\x7c" +
"\x09\xf7\x08\xdc\x2b\xc0\xd4\x69\xef\x30\x2a\x46\xb9\xff\x58\x73\x9f\x5a\xbe\xc2\x7c\x1a\xed\x8d\x0b\x70\xaf\xc4" +
"\x3d\x53\xee\xbf\xef\x8e\x7a\xff\x4d\x47\x7e\x8c\x0e\xee\xc7\x58\x01\x63\x06\xd4\x1d\xf6\x41\x9b\x18\x51\xfc\x61" +
"\xf9\xb2\xb4\xe5\x7b\x55\x1b\xc3\xb3\x18\x33\x61\xec\x84\x31\x14\xf1\xdc\xfb\x40\x5a\xf1\x97\x4e\xf1\xd7\x34\x8a" +
"\xd9\x06\x3f\xa9\xe4\x3b\xb6\x48\xb1\xa2\xfa\x12\xc6\x8e\x18\x43\x62\x2c\x89\x31\x25\xc6\x96\x29\xe3\x4f\x6f\x26" +
"\xc5\xaa\xf1\x62\x58\x8c\x6d\x31\xc6\x4d\x26\xbf\x7f\x3d\x60\xcc\xac\xce\xa3\x18\x1a\x63\x69\x8c\xa9\xb9\x5b\xc6" +
"\xd8\x14\x7f\xe7\xc4\xc4\xdf\x39\xb2\x0e\x63\x73\x8c\x91\x93\xc5\xf0\xc4\x47\x49\x2a\x9f\x30\x68\x0a\xf3\x15\x65" +
"\x31\x6b\xaf\x7e\xd3\x3a\x53\xd4\x5b\x67\x8c\x44\xe7\x0f\x49\xc9\xcf\x30\xad\xd6\x59\x27\xa9\xfc\x58\x5d\xf4\x69" +
"\x14\x2f\x8d\x95\x67\xab\x51\x9f\xcf\xa6\x5b\x67\xbd\xb4\xe4\x7f\xde\x1f\x7b\x6d\x1c\x66\x2a\x1c\x66\x0c\xe9\x99" +
"\xc3\x8c\x4d\xb7\x28\xcf\xa2\x4c\x8b\xd4\x74\xa8\xc5\xa2\x1e\x8b\x02\x16\x99\x8c\xa9\xc0\x48\x90\x6a\xcb\x9d\xc9" +
"\x18\x9b\xcd\x18\xfb\xfb\xd8\x3c\xc5\xc3\x9f\xb5\x56\xee\x3e\x77\x9f\x3f\xcc\xc7\xda\x1f\x1f\x16\x5c\x7d\x5b\x70" +
"\x75\xa1\xe0\x6a\xc1\xef\x89\x6c\xde\xff\x2a\xb8\xfa\x37\x82\x2b\xb3\x05\x57\x72\x7a\x35\xc6\x0c\x2d\x79\x3e\x29" +
"\x0d\xfc\xdf\x16\x5c\x0d\x0a\xae\xc2\x1d\x22\x53\x70\xb5\x53\x70\xf5\x20\xed\xeb\x5c\xc9\xc7\x58\xc3\x48\x33\x3f" +
"\x97\x18\xbf\x42\xb1\x57\x5a\x84\x6d\x07\x60\x4a\xd2\x37\x6e\x5b\x97\xfd\x1b\xf5\x56\x2a\xb8\xfa\x24\xec\x67\x4c" +
"\xe7\xc3\x1b\x83\x83\x5f\x73\x05\x31\xc6\x0b\xd6\xbe\x45\xe7\xf2\x64\x14\x3c\xbb\x08\x8c\x8a\xa7\xfa\x71\x21\xc6" +
"\xc2\x1c\x30\x0e\x7e\x0d\x02\x27\xfe\x81\x78\x20\xe1\x3b\xd6\xc9\x78\x84\x39\xd8\xf5\xe2\x29\x60\x94\xcd\x04\xe1" +
"\xcd\x8a\x1d\x47\xa3\xe0\xea\x0b\x7e\xce\x5c\x7a\x8a\xfc\x64\x7c\xfc\x2c\x48\xf1\x75\xb8\x6f\x48\x9c\x37\xf8\x31" +
"\xdb\x4a\x64\x9c\x84\xb2\xbd\x19\xe0\x3f\xf2\x17\x60\xb6\xee\x85\x68\xe0\x26\x40\x34\x12\x13\x20\x46\xa8\x0e\xbf" +
"\x61\x1b\x6c\x8b\x7d\xf4\xe2\xc9\x10\x6a\x58\x0b\xe1\xcb\x5b\xc1\xa8\xfc\x46\xff\x9c\x70\xb5\x0d\xc7\xd0\xa3\x65" +
"\x33\x91\xe6\x3c\x0c\x17\x7f\xa4\xeb\x14\xc5\xb4\xc2\xc3\xe8\x3c\x43\xb1\x65\xb0\x3b\xe5\x98\xb1\x0d\xb6\xc5\x3e" +
"\xf2\x7c\x30\x13\x22\xdd\x35\x10\xf5\x5f\xa7\x73\xa9\x28\xbc\xc7\x1e\x43\x93\xe0\xca\x53\x14\x73\x16\xa6\x8e\x89" +
"\x86\x83\x9f\xce\x41\x55\xdf\x23\xec\x62\x77\x2e\x9d\xc7\xed\xb3\xa8\x1c\x5c\x10\xa2\xa2\x05\x22\xb7\x3e\x21\xc2" +
"\x77\xac\xeb\xff\x1e\xa2\x3e\xd8\x17\x79\x20\xaf\x68\xa8\x87\xda\x84\xea\x97\xcb\xbc\xb3\x1c\x43\xa5\xe0\xea\xe4" +
"\x74\x62\xba\xe1\xe0\x0f\x35\xac\x91\x36\xc0\xdd\x10\xac\x7b\xbb\x1f\x7b\x34\x0c\x66\x47\x05\xdd\x3d\xe9\xa5\x8f" +
"\x80\x5e\x34\x51\x52\xe9\x23\xf2\x3e\xaa\xa3\x82\xda\xd8\x63\x08\xd6\xfe\x52\xc6\xee\xde\x0c\xe2\x69\x8f\x1d\xcf" +
"\x4d\x92\xbf\x1a\x45\x7f\xeb\xf3\x32\x57\x5f\x0a\x3b\x4a\x17\x3f\xea\xd2\x28\x9f\x25\xf5\x76\xe4\x3b\xfd\x79\xad" +
"\x70\x1f\x84\xce\xff\x17\xe8\x7b\x26\x59\xfe\xc6\xca\xdb\xdb\x3e\x46\x63\xf4\x0d\xdb\xd8\xbc\xe9\x0c\x78\xe4\x79" +
"\xe2\x85\x3c\x69\x9e\x68\x7e\x7b\x21\x50\xfd\x63\x7b\x4d\x5f\x13\x5c\xfd\x7a\xca\x73\x45\x9a\xf8\x69\x7e\xad\xb5" +
"\x67\xde\xa8\xea\xd7\x59\xdd\x02\x79\x0f\xc1\xa5\x1f\xe9\xd9\x39\x06\x6e\x6e\xcd\x22\xc2\x77\xb9\x36\x5d\xd4\x06" +
"\xdb\xda\xf6\x64\xde\x38\x42\xbc\x90\x27\xf2\x76\x4c\xac\xbb\x86\x72\x44\xd6\x18\xde\xd3\xb9\xcb\x9d\xcc\x1f\xa5" +
"\x83\x9f\xf2\x5c\x15\x73\x48\x5f\x81\x4f\x5f\x75\xce\xa8\xe1\xcb\x5b\x1c\x9b\x45\xac\x57\xde\xcd\xa3\x5c\x66\xcd" +
"\xd2\x29\x44\xf8\x8e\x75\x72\x1c\x0a\xb5\xc5\x3e\x92\xa9\x49\xbc\x68\x0e\x2a\xe6\x0c\x38\x5b\x87\x2e\x2c\xb1\xce" +
"\x86\x6a\xbb\xe0\xea\x57\x93\x9f\x2d\x53\xe3\xa7\x5c\xcf\xae\x6c\xb2\x03\xb3\xb3\x5a\xea\xa9\xaf\x51\x9e\x5d\x35" +
"\x06\xdd\xdb\x33\x9c\x9c\x53\x3c\xc2\x6f\xd8\x86\xfc\x4e\xf9\x57\x9c\xfc\x9f\xd9\xf9\xb1\xb4\xbb\xc2\x6c\x30\xdb" +
"\xcb\xfb\xf5\xa5\x5f\x95\x79\x41\xb9\x67\x2c\x12\xdc\x9d\xf0\xce\x2a\x1d\xfc\xe4\xdf\xc8\x5f\x7c\x97\x72\xf1\x54" +
"\x57\xf3\xef\x64\x17\xbd\x1e\x37\xe5\x6c\x12\x61\xb7\x09\xdb\x60\x5b\xec\x83\x7d\xe5\x00\x0c\xe2\x89\xbc\x51\xc6" +
"\x00\x99\x75\x0b\x6d\x1b\x3a\x2e\xb8\x32\x61\xa4\xf8\xf1\x37\xe5\xe9\x35\x06\xa1\x86\x55\x96\x7e\x5a\xc0\x28\x9d" +
"\x49\x75\xad\xef\x8d\x1b\x82\xb5\x76\xd9\xc0\x7b\x00\x9b\xb0\xad\xed\xfb\xa3\xfa\x15\x69\x2b\x17\x57\x51\x1d\xca" +
"\x88\x95\x8d\xfe\x57\xde\x9f\x29\x3e\xc1\xd5\x6f\x26\xce\x8f\x24\xc7\x1f\xf1\x35\x80\x5e\xf2\x00\xe8\xbb\xf3\x21" +
"\x72\xf3\x98\x65\xf7\x1f\x80\xf0\x8e\x81\x9e\x1d\x63\xc8\xc6\x6d\x7c\x35\x4b\xa7\x92\xbd\xdf\xda\x96\x09\x5d\xdb" +
"\x33\xa1\x6d\x43\x8e\x73\xbf\x60\xe7\xf9\xb1\x0f\xfa\x48\xdc\x7b\x89\xff\xcd\x6a\xe2\x4d\x79\x65\x5f\xc3\x40\xbd" +
"\xfd\xee\x5b\xb6\x0d\x51\x7e\x3b\xde\x3a\x4e\x85\xdf\xec\x38\x44\xb6\x6f\x94\x3d\x46\xff\x67\xc0\x27\x70\xf2\x65" +
"\xe2\x7b\xed\xfd\x9c\x98\xbc\xe7\x54\xa9\x5f\x27\x16\x50\x40\xe7\x2a\x5c\xdf\x9c\x4d\xf7\x32\x76\x3b\xec\x83\x7d" +
"\x03\x9f\xfc\xa3\xc4\xe9\x6f\x27\xde\x28\x03\x65\x0d\xb0\xa1\x9a\xff\xb0\xf1\x6f\xd3\xb9\x2b\xee\x9d\x69\x2a\xfc" +
"\xa4\x6b\x9c\xdf\xc3\xcf\x01\x44\x02\x94\xcb\x35\x2a\x9f\xa6\xba\xa6\xb5\x13\x9c\x7c\x29\xae\x51\x9f\x47\xe6\x93" +
"\xf4\xc2\x6c\xd0\x77\x8f\x73\xe2\xcd\xcb\xeb\xf3\x9d\xfc\x2a\xf6\x21\x7e\x87\x9e\x96\x79\xe1\x48\x80\x78\x63\x1d" +
"\xca\x1a\x20\xfb\x2a\xb7\xf7\xb3\x6a\xc1\x95\xdc\x91\xe0\x0f\x5d\x58\x26\xfd\xe6\xf1\x97\xa4\xbe\xc4\x65\xca\x5d" +
"\xf5\xee\x54\x29\xe7\x6d\xeb\xb5\x0d\xf5\xca\x5d\x60\xec\x9d\x4a\x77\x30\x91\xda\x37\xc0\x5f\x3e\x93\xc6\xd3\xf9" +
"\xc1\x58\xb2\x2d\x3b\x4f\xee\xdb\xa9\x12\x0f\xe4\x45\xf3\x79\xfc\x25\x92\x81\xb2\x06\xd8\xee\xcd\x13\xf2\xce\x98" +
"\x2b\x4d\x82\xab\x0f\x26\xc9\x91\x3e\x97\x08\x3f\xed\x4f\x3b\x19\x04\x4f\xbd\x2e\x79\xf6\xd4\xd2\xbe\xd3\xbd\x7d" +
"\x0c\x9c\xb5\x6c\x1b\xb1\xe1\x7e\xa5\x7b\x55\x08\x1d\xfb\x11\x40\xf3\x5a\x22\xf3\xf4\xcf\x69\x2e\xd0\xff\xa3\xed" +
"\x23\x7e\xec\xd3\xbd\xdd\x4d\x31\x74\xa4\xa7\x4e\xca\x38\xf5\xba\x94\x81\xfb\x5b\xac\xef\x10\xcd\x74\xf7\x64\xdd" +
"\x79\xcf\x4a\x82\xff\x5b\x42\x63\x86\x71\xf0\xc9\x21\xb1\x24\xf9\x4e\xe4\x5d\x3b\xdf\xd2\xc9\x71\xd0\x8b\xf2\xa1" +
"\x6b\x5b\x86\xe3\x63\xb0\xec\xda\x9e\x41\xf7\x6f\x66\xcd\xeb\x00\xcd\x6b\x00\x9a\x56\x43\xb4\x7e\x31\x18\x7b\x27" +
"\x83\xcf\x23\xe7\x0a\xf1\x3b\x6d\x8b\xf2\xe9\xff\x3a\x24\xa3\x76\xbe\x94\x31\xc8\x87\x62\x6c\x4a\x31\x8b\xc6\xfa" +
"\x04\x57\x9f\x4e\x82\xff\x69\x6c\x43\xb1\x88\xff\xfa\xc8\xf0\x6f\xcb\x00\x7d\x57\x16\x98\x67\x7e\xde\x8f\xff\x42" +
"\x01\x18\xc5\x93\x08\xff\xf9\x91\xe0\x0f\x76\x03\xea\x14\x75\x4b\x3a\x4e\x8c\x7f\x16\xe5\x96\xf7\xcd\xa0\x39\x4b" +
"\x6e\x3f\x75\x34\xf7\x68\x03\xb6\xfd\xa0\xef\xb9\xb1\x85\xee\xd3\x21\x78\xe4\xcf\xe8\x0e\x10\xed\x27\x7c\xe2\x45" +
"\xd0\xbd\x19\xd0\xbd\x23\x83\xda\x0e\xdb\x7e\xc2\x7d\x74\x67\x81\xb6\x4d\x36\x9e\x18\xff\x83\xb8\x46\xf4\xa2\x09" +
"\x74\xdf\x31\x92\xf5\x7b\xf5\xb7\xb9\x96\xef\xc9\x81\x60\xd5\x73\x10\xaa\xfe\x3e\xe8\xc5\xf7\x82\xce\x15\xba\xd3" +
"\xc2\x31\x9e\xfa\xb5\xbd\x7e\x95\xb4\xd6\xef\x20\xfc\xdf\x8e\x8f\x9f\x72\xeb\xb9\xe4\xa3\x70\x5f\xb9\xca\x07\xf0" +
"\x48\xd7\x7f\x9e\x5b\x81\x7b\x53\x46\x7f\xec\x6c\x91\x4f\xeb\x8f\x2f\xb0\x6d\xe3\x30\xfc\x67\xba\xf8\xe5\xde\xa0" +
"\x6e\x47\x1e\xc1\x9a\xf9\x03\x78\xa4\xbb\x7f\x21\x35\xad\x1b\x0f\xbd\x9e\x31\xd6\x3d\xa6\x0a\x7d\x9a\x9b\xe6\x05" +
"\x75\x3f\x64\xff\x3a\xf9\xb2\xb5\x46\x13\xef\x5f\xe9\xe0\xd7\xed\xbb\x3e\xdc\xa3\x51\x2f\xbf\xfb\xd3\x81\x71\x48" +
"\xdc\xf8\x61\x6b\xdc\xf8\xc1\xde\xc7\x30\x6e\x40\x9c\xa8\xeb\x58\xec\xc3\x89\x1f\xd2\xc5\x1f\xb3\x06\xbe\x29\xb8" +
"\xd2\xa7\xef\xb9\x0f\x22\x5d\x9f\x0e\xe0\xe1\xc4\x6f\x17\xd3\x8b\xdf\x12\xd1\x70\xe2\xb7\xe1\xe1\xa7\x35\x30\x81" +
"\x62\x55\xcd\x45\xe7\xd0\xd8\xe7\xb3\x88\x9f\x87\x85\x5f\x53\x18\xfd\x3f\x95\xab\x8b\xe5\x19\xe3\x71\x3a\x43\x38" +
"\x6b\xe0\xf7\x76\x7e\xa9\x8e\x7b\x7e\x19\x2e\xfe\x18\x1b\xc2\xb3\x5a\x07\x9e\xdd\xf0\x0c\xe7\xf0\xb9\x23\xe7\xc7" +
"\x9b\xa3\xc4\x4f\x7e\xc8\x8d\x67\x66\x3a\xa7\xef\x7f\x88\xce\xd2\xf6\x93\xf6\xf9\x7d\x47\xcc\xf9\x7d\x47\xb2\xf3" +
"\x7b\x55\xdc\xf3\xfb\x48\xf1\xc7\xcc\xc1\xd7\x28\x77\x81\x3e\xae\xfa\xaf\x29\xa7\x01\x43\xf2\x27\xcf\x0f\xcc\x9f" +
"\x9c\xbb\x3d\xf9\x93\xd1\xe2\xef\xe3\x2e\xe6\xe3\x4c\x91\x67\x66\x35\x8a\x7e\x8e\xd6\xb2\xa5\xb3\xd4\xf9\xab\x17" +
"\xc1\x28\x7d\x04\xf4\x3d\x13\x89\x8c\x44\xf9\xab\xba\xb7\x87\xe6\xaf\x6e\x03\xfe\x98\x39\x98\x2c\xb8\x7a\xc8\xb6" +
"\xd9\x50\xfd\x32\x99\x1b\x0c\xf5\x38\xfe\xe2\xf6\xe5\x0f\x13\xe7\x4e\x47\x84\xbf\x50\xb5\xfd\xe9\x1c\x2b\x97\x4a" +
"\xb9\x55\xfa\xdf\x50\xe0\x3a\x44\xba\xcf\xc8\xdc\x37\xda\x8a\x9d\xbf\x4d\x82\xc1\xc1\x62\xe5\x6f\xb1\x0f\xe5\x7e" +
"\x4b\x1f\xa5\x5c\x70\xd2\x3e\x23\xc0\x4f\x63\xf0\xba\x58\x8f\x27\x1b\xe7\xe1\x05\x99\xd3\x56\x68\xbe\x8d\xca\x6f" +
"\xd0\xbe\x19\x6a\x58\xeb\xac\x3d\x27\x7f\xde\x56\x92\x7e\xfe\xbc\xe4\x41\x30\xdb\xf6\xa5\x1e\xf3\x08\xf1\xe3\xa3" +
"\x7b\x15\x66\xec\xa2\xff\x6d\xbc\x60\xdd\x2d\x48\xbc\xbb\xb2\xe8\xbf\x31\x7a\xf1\xd4\x24\xf7\x17\xf3\x89\x12\xdd" +
"\x5f\x18\x15\x4f\xd1\x1d\x48\xca\x7b\x92\xda\xb7\xac\xff\xda\xba\x86\x8d\x9f\xc6\xc0\x5d\x0c\xbc\xe4\x5b\xd1\x27" +
"\x95\x39\x77\x64\x8e\x8f\x19\xcd\xfd\xd1\xb0\xee\xa9\x46\x84\x1f\x1f\x43\x73\xd9\x6b\x7a\xbc\xbc\x6b\xa3\x3b\xb7" +
"\x4e\xeb\x0e\xee\x4e\xdd\xf7\x8d\x18\xbf\x33\x0e\x8f\xc2\x7a\x8b\x54\x8c\x35\x72\x04\x57\x67\x0b\xae\xfe\xc4\xba" +
"\x0b\x2d\xb8\x03\xf7\xae\x6f\x5b\x77\xbc\x23\xc6\x7f\xf7\xb9\xfb\x7c\x9e\x1e\xb9\x43\x24\x2e\x5b\x18\x63\xcf\x58" +
"\x65\x9e\x55\x66\x5a\xa5\x6b\x50\xc9\xec\xb2\xc0\x2a\x9f\x19\x54\x4e\x4f\x50\xe6\x25\x28\x33\x6f\x5f\xd9\x93\xa0" +
"\x0c\x24\x28\xcd\x41\x65\xd4\x2a\xc1\x2e\x17\x0e\x2a\x5b\xac\xb2\xc7\x2a\x4d\xab\x4c\xa1\xdf\xff\x0f\x00\x00\xff" +
"\xff\xc6\xb9\x24\x2f\xee\x3a\x00\x00")

func gzipBindataAssetsfaviconico() (*gzipAsset, error) {
bytes := _gzipBindataAssetsfaviconico
info := gzipBindataFileInfo{
name: "assets/favicon.ico",
size: 15086,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1565946440, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsindexhtml = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x91\x3d\x4f\xc3\x30\x10\x86\xf7\x48\xf9\x0f\xd7\x9b\x40\x22\x35\x6c" +
"\x0c\x71\x96\x42\x57\x90\x28\x03\xa3\xeb\x5c\x9b\x6b\x1d\x27\xb2\x2f\x69\xfb\xef\x51\x3e\xca\xe7\x64\xdf\xeb\xbb" +
"\xc7\x8f\xec\x7c\xf1\xf4\xb2\xda\x7c\xbc\x3e\x43\x25\xb5\x2b\xd2\x24\x1f\x56\x70\xc6\xef\x35\x92\xc7\x22\x4d\x86" +
"\x8c\x4c\x59\xa4\x09\x00\x40\x5e\x93\x18\xb0\x95\x09\x91\x44\xe3\xfb\x66\x9d\x3d\xe2\xaf\x33\x6f\x6a\xd2\xd8\x33" +
"\x9d\xda\x26\x08\x82\x6d\xbc\x90\x17\x8d\x27\x2e\xa5\xd2\x25\xf5\x6c\x29\x1b\x8b\x3b\x60\xcf\xc2\xc6\x65\xd1\x1a" +
"\x47\xfa\x61\x79\xff\xc5\x72\xec\x8f\x10\xc8\x69\x64\xdb\x78\x84\x2a\xd0\x4e\xa3\x6a\xbb\xad\x63\xab\x76\xa6\x1f" +
"\xe2\x25\xdb\x06\x41\x2e\x2d\x69\xe4\xda\xec\x49\x9d\xb3\xa9\x5d\xfd\xe7\x44\xb9\x38\x8a\x15\x91\xfc\xa5\xd9\x18" +
"\x55\x6d\xd8\x2f\x6d\x8c\x3f\x46\x85\xc5\x51\xb1\x66\x47\xf0\x46\xa1\xa7\x90\xab\x29\x4a\x93\x5c\xcd\x6f\x92\x26" +
"\xf9\xb6\x29\x2f\xd7\x11\xf6\x6d\x27\xb3\xd0\xb6\x13\x19\x54\x1a\x6f\x1d\xdb\xa3\xc6\xc6\xaf\x86\xcd\xcd\x2d\x42" +
"\x6f\x5c\x47\x1a\xc7\x1a\x6a\x5a\x4c\xb7\xce\x90\x68\x03\xb7\x57\x8a\xd0\x59\xd4\xc1\xf4\x66\x4a\x11\x62\xb0\xdf" +
"\xe6\x87\x59\xfc\x10\xb1\xc8\xd5\xd4\x32\xea\xcd\x52\xa3\xe9\xf0\xb3\x9f\x01\x00\x00\xff\xff\x00\xcf\x96\xa8\xe9" +
"\x01\x00\x00")

func gzipBindataAssetsindexhtml() (*gzipAsset, error) {
bytes := _gzipBindataAssetsindexhtml
info := gzipBindataFileInfo{
name: "assets/index.html",
size: 489,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1594886229, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

var _gzipBindataAssetsjsmainjs = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xce\xcf\x2b\xce\xcf\x49\xd5\xcb\xc9\x4f\xd7\x50\x4a\xad\x48\xcc\x2d" +
"\xc8\x49\x55\xd2\xb4\xe6\xe5\xe2\xe5\x4a\x2b\xcd\x4b\x2e\xc9\xcc\xcf\x53\xc8\xcf\x73\xce\xc9\x4c\xce\xd6\xd0\x54" +
"\xa8\xe6\xe5\x52\x50\x50\x50\x28\xcf\xcc\x4b\xc9\x2f\xd7\x4b\xcc\x49\x2d\x2a\xd1\x50\x4a\x2a\x2d\x29\xc9\xcf\x53" +
"\x48\x06\xa9\x49\x4d\x01\x6b\xae\x05\x04\x00\x00\xff\xff\xa4\xb7\x99\x52\x57\x00\x00\x00")

func gzipBindataAssetsjsmainjs() (*gzipAsset, error) {
bytes := _gzipBindataAssetsjsmainjs
info := gzipBindataFileInfo{
name: "assets/js/main.js",
size: 87,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1594787764, 0),
}

a := &gzipAsset{bytes: bytes, info: info}

return a, nil
}

// GzipAsset 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 GzipAsset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _gzipbindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("GzipAsset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
}

// MustGzipAsset is like GzipAsset but panics when GzipAsset would return an error.
// It simplifies safe initialization of global variables.
// nolint: deadcode
func MustGzipAsset(name string) []byte {
a, err := GzipAsset(name)
if err != nil {
panic("asset: GzipAsset(" + name + "): " + err.Error())
}

return a
}

// GzipAssetInfo 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 GzipAssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _gzipbindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("GzipAssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
}

// GzipAssetNames returns the names of the assets.
// nolint: deadcode
func GzipAssetNames() []string {
names := make([]string, 0, len(_gzipbindata))
for name := range _gzipbindata {
names = append(names, name)
}
return names
}

//
// _gzipbindata is a table, holding each asset generator, mapped to its name.
//
var _gzipbindata = map[string]func() (*gzipAsset, error){
"assets/app2/app2app3/css/main.css": gzipBindataAssetsapp2app2app3cssmaincss,
"assets/app2/app2app3/dirs/dir1/text.txt": gzipBindataAssetsapp2app2app3dirsdir1texttxt,
"assets/app2/app2app3/dirs/dir2/text.txt": gzipBindataAssetsapp2app2app3dirsdir2texttxt,
"assets/app2/app2app3/dirs/text.txt": gzipBindataAssetsapp2app2app3dirstexttxt,
"assets/app2/app2app3/index.html": gzipBindataAssetsapp2app2app3indexhtml,
"assets/app2/index.html": gzipBindataAssetsapp2indexhtml,
"assets/app2/mydir/text.txt": gzipBindataAssetsapp2mydirtexttxt,
"assets/css/main.css": gzipBindataAssetscssmaincss,
"assets/favicon.ico": gzipBindataAssetsfaviconico,
"assets/index.html": gzipBindataAssetsindexhtml,
"assets/js/main.js": gzipBindataAssetsjsmainjs,
}

// GzipAssetDir returns the file names below a certain
// directory embedded in the file by bindata.
// For example if you run bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
// then GzipAssetDir("data") would return []string{"foo.txt", "img"}
// GzipAssetDir("data/img") would return []string{"a.png", "b.png"}
// GzipAssetDir("foo.txt") and GzipAssetDir("notexist") would return an error
// GzipAssetDir("") will return []string{"data"}.
func GzipAssetDir(name string) ([]string, error) {
node := _gzipbintree
if len(name) != 0 {
cannonicalName := strings.Replace(name, "\\", "/", -1)
pathList := strings.Split(cannonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
return nil, &os.PathError{
Op: "open",
Path: name,
Err: os.ErrNotExist,
}
}
}
}
if node.Func != nil {
return nil, &os.PathError{
Op: "open",
Path: name,
Err: os.ErrNotExist,
}
}
rv := make([]string, 0, len(node.Children))
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}

type gzipBintree struct {
Func func() (*gzipAsset, error)
Children map[string]*gzipBintree
}

var _gzipbintree = &gzipBintree{Func: nil, Children: map[string]*gzipBintree{
"assets": {Func: nil, Children: map[string]*gzipBintree{
"app2": {Func: nil, Children: map[string]*gzipBintree{
"app2app3": {Func: nil, Children: map[string]*gzipBintree{
"css": {Func: nil, Children: map[string]*gzipBintree{
"main.css": {Func: gzipBindataAssetsapp2app2app3cssmaincss, Children: map[string]*gzipBintree{}},
}},
"dirs": {Func: nil, Children: map[string]*gzipBintree{
"dir1": {Func: nil, Children: map[string]*gzipBintree{
"text.txt": {Func: gzipBindataAssetsapp2app2app3dirsdir1texttxt, Children: map[string]*gzipBintree{}},
}},
"dir2": {Func: nil, Children: map[string]*gzipBintree{
"text.txt": {Func: gzipBindataAssetsapp2app2app3dirsdir2texttxt, Children: map[string]*gzipBintree{}},
}},
"text.txt": {Func: gzipBindataAssetsapp2app2app3dirstexttxt, Children: map[string]*gzipBintree{}},
}},
"index.html": {Func: gzipBindataAssetsapp2app2app3indexhtml, Children: map[string]*gzipBintree{}},
}},
"index.html": {Func: gzipBindataAssetsapp2indexhtml, Children: map[string]*gzipBintree{}},
"mydir": {Func: nil, Children: map[string]*gzipBintree{
"text.txt": {Func: gzipBindataAssetsapp2mydirtexttxt, Children: map[string]*gzipBintree{}},
}},
}},
"css": {Func: nil, Children: map[string]*gzipBintree{
"main.css": {Func: gzipBindataAssetscssmaincss, Children: map[string]*gzipBintree{}},
}},
"favicon.ico": {Func: gzipBindataAssetsfaviconico, Children: map[string]*gzipBintree{}},
"index.html": {Func: gzipBindataAssetsindexhtml, Children: map[string]*gzipBintree{}},
"js": {Func: nil, Children: map[string]*gzipBintree{
"main.js": {Func: gzipBindataAssetsjsmainjs, Children: map[string]*gzipBintree{}},
}},
}},
}}

+ 23
- 32
_examples/file-server/http2push-embedded-gzipped/main.go View File

@@ -1,50 +1,41 @@
package main

import (
"regexp"

"github.com/kataras/iris/v12"
)

// Follow the steps below:
// $ go get -u github.com/kataras/bindata/cmd/bindata
//
// $ bindata -prefix "../http2push/" ../http2push/assets/...
// # OR if the ./assets directory was inside this example foder:
// # bindata ./assets/...
//
// How to run:
// $ go get -u github.com/go-bindata/go-bindata/v3/go-bindata
// $ go-bindata -nomemcopy -fs -prefix "../http2push/assets" ../http2push/assets/...
// $ go run .
// Physical files are not used, you can delete the "assets" folder and run the example.

var opts = iris.DirOptions{
IndexName: "/index.html",
PushTargets: map[string][]string{
"/": { // Relative path without route prefix.
"favicon.ico",
"js/main.js",
"css/main.css",
// ^ Relative to the index, if need absolute ones start with a slash ('/').
},
IndexName: "index.html",
PushTargetsRegexp: map[string]*regexp.Regexp{
"/": iris.MatchCommonAssets,
"/app2/app2app3": iris.MatchCommonAssets,
},
// OR:
// PushTargetsRegexp: map[string]*regexp.Regexp{
// "/": iris.MatchCommonAssets,
// "/app2/app2app3": iris.MatchCommonAssets,
// },
Compress: false, // SHOULD be set to false, files already compressed.
ShowList: true,
Asset: GzipAsset,
AssetInfo: GzipAssetInfo,
AssetNames: GzipAssetNames,
// Required for pre-compressed files:
AssetValidator: func(ctx iris.Context, _ string) bool {
// ctx.Header("Vary", "Content-Encoding")
ctx.Header("Content-Encoding", "gzip")
return true
ShowList: true,
Cache: iris.DirCacheOptions{
Enable: true,
CompressIgnore: iris.MatchImagesAssets,
// Here, define the encodings that the cached files should be pre-compressed
// and served based on client's needs.
Encodings: []string{"gzip", "deflate", "br", "snappy"},
CompressMinSize: 50, // files smaller than this size will NOT be compressed.
Verbose: 1,
},
}

func main() {
app := iris.New()
app.HandleDir("/public", "./assets", opts)
app.HandleDir("/public", AssetFile(), opts)

// https://127.0.0.1/public
// https://127.0.0.1/public/app2
// https://127.0.0.1/public/app2/app2app3
// https://127.0.0.1/public/app2/app2app3/dirs
app.Run(iris.TLS(":443", "../http2push/mycert.crt", "../http2push/mykey.key"))
}

+ 217
- 120
_examples/file-server/http2push-embedded/bindata.go
File diff suppressed because it is too large
View File


+ 12
- 12
_examples/file-server/http2push-embedded/main.go View File

@@ -6,32 +6,32 @@ import (
"github.com/kataras/iris/v12"
)

// Follow the steps below:
// $ go get -u github.com/go-bindata/go-bindata/...
//
// $ go-bindata -nomemcopy -prefix "../http2push/" ../http2push/assets/...
// How to run:
// $ go get -u github.com/go-bindata/go-bindata/v3/go-bindata
// $ go-bindata -nomemcopy -fs -prefix "../http2push/assets" ../http2push/assets/...
// # OR if the ./assets directory was inside this example foder:
// # go-bindata -nomemcopy ./assets/...
// # go-bindata -nomemcopy -refix "assets" ./assets/...
//
// $ go run .
// Physical files are not used, you can delete the "assets" folder and run the example.

var opts = iris.DirOptions{
IndexName: "/index.html",
IndexName: "index.html",
PushTargetsRegexp: map[string]*regexp.Regexp{
"/": iris.MatchCommonAssets,
"/app2/app2app3": iris.MatchCommonAssets,
},
Compress: false,
ShowList: true,
Asset: Asset,
AssetInfo: AssetInfo,
AssetNames: AssetNames,
Compress: false,
ShowList: true,
}

func main() {
app := iris.New()
app.HandleDir("/public", "./assets", opts)
app.HandleDir("/public", AssetFile(), opts)

// https://127.0.0.1/public
// https://127.0.0.1/public/app2
// https://127.0.0.1/public/app2/app2app3
// https://127.0.0.1/public/app2/app2app3/dirs
app.Run(iris.TLS(":443", "../http2push/mycert.crt", "../http2push/mykey.key"))
}

+ 7
- 2
_examples/file-server/http2push/main.go View File

@@ -7,7 +7,7 @@ import (
)

var opts = iris.DirOptions{
IndexName: "/index.html",
IndexName: "index.html",
// Optionally register files (map's values) to be served
// when a specific path (map's key WITHOUT prefix) is requested
// is fired before client asks (HTTP/2 Push).
@@ -38,10 +38,15 @@ var opts = iris.DirOptions{

func main() {
app := iris.New()
app.HandleDir("/public", "./assets", opts)
app.HandleDir("/public", iris.Dir("./assets"), opts)

// Open your browser's Network tools,
// navigate to https://127.0.0.1/public.
// you should see `Initiator` tab: "Push / public".
//
// https://127.0.0.1/public
// https://127.0.0.1/public/app2
// https://127.0.0.1/public/app2/app2app3
// https://127.0.0.1/public/app2/app2app3/dirs
app.Run(iris.TLS(":443", "mycert.crt", "mykey.key"))
}

+ 1
- 1
_examples/file-server/single-page-application/basic/main.go View File

@@ -20,7 +20,7 @@ func newApp() *iris.Application {
ctx.View("index.html")
})

app.HandleDir("/", "./public")
app.HandleDir("/", iris.Dir("./public"))

return app
}


+ 132
- 37
_examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/bindata.go View File

@@ -1,10 +1,9 @@
// Code generated by go-bindata.
// sources:
// Code generated by go-bindata. (@generated) DO NOT EDIT.

//Package main generated by go-bindata.// sources:
// public/app.js
// public/css/main.css
// public/index.html
// DO NOT EDIT!

package main

import (
@@ -13,6 +12,7 @@ import (
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strings"
@@ -22,7 +22,7 @@ import (
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %v", name, err)
}

var buf bytes.Buffer
@@ -30,7 +30,7 @@ func bindataRead(data []byte, name string) ([]byte, error) {
clErr := gz.Close()

if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %v", name, err)
}
if clErr != nil {
return nil, err
@@ -51,81 +51,178 @@ type bindataFileInfo struct {
modTime time.Time
}

// Name return file name
func (fi bindataFileInfo) Name() string {
return fi.name
}

// Size return file size
func (fi bindataFileInfo) Size() int64 {
return fi.size
}

// Mode return file mode
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}

// ModTime return file modify time
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}

// IsDir return file whether a directory
func (fi bindataFileInfo) IsDir() bool {
return false
return fi.mode&os.ModeDir != 0
}

// Sys return file is sys mode
func (fi bindataFileInfo) Sys() interface{} {
return nil
}

var _publicAppJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2a\xcf\xcc\x4b\xc9\x2f\xd7\x4b\xcc\x49\x2d\x2a\xd1\x50\x4a\x2c\x28\xd0\xcb\x2a\x56\xc8\xc9\x4f\x4c\x49\x4d\x51\x48\x2b\xca\xcf\x55\x88\x51\xd2\x57\xd2\xb4\x06\x04\x00\x00\xff\xff\xa9\x06\xf7\xa3\x27\x00\x00\x00")
type assetFile struct {
*bytes.Reader
name string
childInfos []os.FileInfo
childInfoOffset int
}

type assetOperator struct{}

// Open implement http.FileSystem interface
func (f *assetOperator) Open(name string) (http.File, error) {
var err error
if len(name) > 0 && name[0] == '/' {
name = name[1:]
}
content, err := Asset(name)
if err == nil {
return &assetFile{name: name, Reader: bytes.NewReader(content)}, nil
}
children, err := AssetDir(name)
if err == nil {
childInfos := make([]os.FileInfo, 0, len(children))
for _, child := range children {
childPath := filepath.Join(name, child)
info, errInfo := AssetInfo(filepath.Join(name, child))
if errInfo == nil {
childInfos = append(childInfos, info)
} else {
childInfos = append(childInfos, newDirFileInfo(childPath))
}
}
return &assetFile{name: name, childInfos: childInfos}, nil
} else {
// If the error is not found, return an error that will
// result in a 404 error. Otherwise the server returns
// a 500 error for files not found.
if strings.Contains(err.Error(), "not found") {
return nil, os.ErrNotExist
}
return nil, err
}
}

// Close no need do anything
func (f *assetFile) Close() error {
return nil
}

// Readdir read dir's children file info
func (f *assetFile) Readdir(count int) ([]os.FileInfo, error) {
if len(f.childInfos) == 0 {
return nil, os.ErrNotExist
}
if count <= 0 {
return f.childInfos, nil
}
if f.childInfoOffset+count > len(f.childInfos) {
count = len(f.childInfos) - f.childInfoOffset
}
offset := f.childInfoOffset
f.childInfoOffset += count
return f.childInfos[offset : offset+count], nil
}

// Stat read file info from asset item
func (f *assetFile) Stat() (os.FileInfo, error) {
if len(f.childInfos) != 0 {
return newDirFileInfo(f.name), nil
}
return AssetInfo(f.name)
}

// newDirFileInfo return default dir file info
func newDirFileInfo(name string) os.FileInfo {
return &bindataFileInfo{
name: name,
size: 0,
mode: os.FileMode(2147484068), // equal os.FileMode(0644)|os.ModeDir
modTime: time.Time{}}
}

// AssetFile return a http.FileSystem instance that data backend by asset
func AssetFile() http.FileSystem {
return &assetOperator{}
}

var _appJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2a\xcf\xcc\x4b\xc9\x2f\xd7\x4b\xcc\x49\x2d\x2a\xd1\x50\x4a\x2c\x28\xd0\xcb\x2a\x56\xc8\xc9\x4f\x4c\x49\x4d\x51\x48\x2b\xca\xcf\x55\x88\x51\xd2\x57\xd2\xb4\x06\x04\x00\x00\xff\xff\xa9\x06\xf7\xa3\x27\x00\x00\x00")

func publicAppJsBytes() ([]byte, error) {
func appJsBytes() ([]byte, error) {
return bindataRead(
_publicAppJs,
"public/app.js",
_appJs,
"app.js",
)
}

func publicAppJs() (*asset, error) {
bytes, err := publicAppJsBytes()
func appJs() (*asset, error) {
bytes, err := appJsBytes()
if err != nil {
return nil, err
}

info := bindataFileInfo{name: "public/app.js", size: 39, mode: os.FileMode(511), modTime: time.Unix(1499700236, 0)}
info := bindataFileInfo{name: "app.js", size: 39, mode: os.FileMode(438), modTime: time.Unix(1565946441, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}

var _publicCssMainCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xca\x4f\xa9\x54\xa8\xe6\xe5\x52\x50\x50\x50\x48\x4a\x4c\xce\x4e\x2f\xca\x2f\xcd\x4b\xd1\x4d\xce\xcf\xc9\x2f\xb2\x52\x48\xca\x49\x4c\xce\xb6\xe6\xe5\xaa\xe5\xe5\x02\x04\x00\x00\xff\xff\x03\x25\x9c\x89\x29\x00\x00\x00")
var _cssMainCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xca\x4f\xa9\x54\xa8\xe6\xe5\x52\x50\x50\x50\x48\x4a\x4c\xce\x4e\x2f\xca\x2f\xcd\x4b\xd1\x4d\xce\xcf\xc9\x2f\xb2\x52\x48\xca\x49\x4c\xce\xb6\xe6\xe5\xaa\xe5\xe5\x02\x04\x00\x00\xff\xff\x03\x25\x9c\x89\x29\x00\x00\x00")

func publicCssMainCssBytes() ([]byte, error) {
func cssMainCssBytes() ([]byte, error) {
return bindataRead(
_publicCssMainCss,
"public/css/main.css",
_cssMainCss,
"css/main.css",
)
}

func publicCssMainCss() (*asset, error) {
bytes, err := publicCssMainCssBytes()
func cssMainCss() (*asset, error) {
bytes, err := cssMainCssBytes()
if err != nil {
return nil, err
}

info := bindataFileInfo{name: "public/css/main.css", size: 41, mode: os.FileMode(511), modTime: time.Unix(1499700236, 0)}
info := bindataFileInfo{name: "css/main.css", size: 41, mode: os.FileMode(438), modTime: time.Unix(1565946441, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}

var _publicIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4c\x8e\x41\x0e\xc2\x20\x10\x45\xf7\x24\xdc\xe1\xa7\x07\x28\xe9\x7e\x64\xed\x35\x10\x46\xc1\x50\x21\x30\x0b\xbd\xbd\x29\xc5\xc4\xf5\x7f\x6f\xde\x50\x94\x3d\x5b\xad\xb4\xa2\xc8\x2e\x58\xad\x00\x80\x24\x49\x66\x7b\xe5\x9c\x0b\xee\xad\xec\xe8\xe2\x24\x79\x54\xf7\x60\x32\xe7\xaa\x15\x99\xe9\x68\x45\xb7\x12\x3e\x3f\x3b\x6e\x16\x7f\x6e\x7a\x05\x7e\xaf\x47\x08\x64\xe2\x36\xf8\x49\x76\xdf\x52\x15\xf4\xe6\x2f\x8b\x71\xb5\xae\xcf\xbe\x58\x80\xcc\x39\x8c\xc6\xbc\x3c\x72\xc7\xb3\xdf\x00\x00\x00\xff\xff\x7e\xad\xd1\x97\xb3\x00\x00\x00")
var _indexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4c\x8e\x41\x0e\xc2\x20\x10\x45\xf7\x24\xdc\xe1\xa7\x07\x28\xe9\x7e\x64\xed\x35\x10\x46\xc1\x50\x21\x30\x0b\xbd\xbd\x29\xc5\xc4\xf5\x7f\x6f\xde\x50\x94\x3d\x5b\xad\xb4\xa2\xc8\x2e\x58\xad\x00\x80\x24\x49\x66\x7b\xe5\x9c\x0b\xee\xad\xec\xe8\xe2\x24\x79\x54\xf7\x60\x32\xe7\xaa\x15\x99\xe9\x68\x45\xb7\x12\x3e\x3f\x3b\x6e\x16\x7f\x6e\x7a\x05\x7e\xaf\x47\x08\x64\xe2\x36\xf8\x49\x76\xdf\x52\x15\xf4\xe6\x2f\x8b\x71\xb5\xae\xcf\xbe\x58\x80\xcc\x39\x8c\xc6\xbc\x3c\x72\xc7\xb3\xdf\x00\x00\x00\xff\xff\x7e\xad\xd1\x97\xb3\x00\x00\x00")

func publicIndexHtmlBytes() ([]byte, error) {
func indexHtmlBytes() ([]byte, error) {
return bindataRead(
_publicIndexHtml,
"public/index.html",
_indexHtml,
"index.html",
)
}

func publicIndexHtml() (*asset, error) {
bytes, err := publicIndexHtmlBytes()
func indexHtml() (*asset, error) {
bytes, err := indexHtmlBytes()
if err != nil {
return nil, err
}

info := bindataFileInfo{name: "public/index.html", size: 179, mode: os.FileMode(511), modTime: time.Unix(1510219864, 0)}
info := bindataFileInfo{name: "index.html", size: 179, mode: os.FileMode(438), modTime: time.Unix(1565946441, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -182,9 +279,9 @@ func AssetNames() []string {

// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"public/app.js": publicAppJs,
"public/css/main.css": publicCssMainCss,
"public/index.html": publicIndexHtml,
"app.js": appJs,
"css/main.css": cssMainCss,
"index.html": indexHtml,
}

// AssetDir returns the file names below a certain
@@ -228,13 +325,11 @@ type bintree struct {
}

var _bintree = &bintree{nil, map[string]*bintree{
"public": {nil, map[string]*bintree{
"app.js": {publicAppJs, map[string]*bintree{}},
"css": {nil, map[string]*bintree{
"main.css": {publicCssMainCss, map[string]*bintree{}},
}},
"index.html": {publicIndexHtml, map[string]*bintree{}},
"app.js": {appJs, map[string]*bintree{}},
"css": {nil, map[string]*bintree{
"main.css": {cssMainCss, map[string]*bintree{}},
}},
"index.html": {indexHtml, map[string]*bintree{}},
}}

// RestoreAsset restores an asset under the given directory


+ 4
- 15
_examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/main.go View File

@@ -2,10 +2,9 @@ package main

import "github.com/kataras/iris/v12"

// $ go get -u github.com/go-bindata/go-bindata/...
// $ go-bindata ./public/...
// $ go build
// $ ./embedded-single-page-application-with-other-routes
// $ go get -u github.com/go-bindata/go-bindata/v3/go-bindata
// $ go-bindata -fs -prefix "public" ./public/...
// $ go run .

func newApp() *iris.Application {
app := iris.New()
@@ -13,17 +12,7 @@ func newApp() *iris.Application {
ctx.Writef("404 not found here")
})

app.HandleDir("/", "./public", iris.DirOptions{
Asset: Asset,
AssetInfo: AssetInfo,
AssetNames: AssetNames,
// IndexName: "index.html", // default.
// If you want to show a list of embedded files when inside a directory without an index file:
// ShowList: true,
// DirList: func(ctx iris.Context, dirName string, f http.File) error {
// // [Optional, custom code to show the html list].
// }
})
app.HandleDir("/", AssetFile())

// Note:
// if you want a dynamic index page then see the file-server/embedded-single-page-application


+ 1
- 1
_examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/public/app.js View File

@@ -1 +1 @@
window.alert("app.js loaded from \"/");
window.alert("app.js loaded from static page of \"/");

+ 161
- 138
_examples/file-server/single-page-application/embedded-single-page-application/bindata.go View File

@@ -1,10 +1,10 @@
// Code generated by go-bindata. DO NOT EDIT.
// sources:
// public\app.js
// public\app2\index.html
// public\css\main.css
// public\index.html
// Code generated by go-bindata. (@generated) DO NOT EDIT.

//Package main generated by go-bindata.// sources:
// public/app.js
// public/app2/index.html
// public/css/main.css
// public/index.html
package main

import (
@@ -13,16 +13,17 @@ import (
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strings"
"time"
)

func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
func bindataRead(data, name string) ([]byte, error) {
gz, err := gzip.NewReader(strings.NewReader(data))
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %v", name, err)
}

var buf bytes.Buffer
@@ -30,7 +31,7 @@ func bindataRead(data []byte, name string) ([]byte, error) {
clErr := gz.Close()

if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %v", name, err)
}
if clErr != nil {
return nil, err
@@ -41,178 +42,215 @@ func bindataRead(data []byte, name string) ([]byte, error) {

type asset struct {
bytes []byte
info fileInfoEx
}

type fileInfoEx interface {
os.FileInfo
MD5Checksum() string
info os.FileInfo
}

type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
md5checksum string
name string
size int64
mode os.FileMode
modTime time.Time
}

// Name return file name
func (fi bindataFileInfo) Name() string {
return fi.name
}

// Size return file size
func (fi bindataFileInfo) Size() int64 {
return fi.size
}

// Mode return file mode
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}

// ModTime return file modify time
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}
func (fi bindataFileInfo) MD5Checksum() string {
return fi.md5checksum
}

// IsDir return file whether a directory
func (fi bindataFileInfo) IsDir() bool {
return false
return fi.mode&os.ModeDir != 0
}

// Sys return file is sys mode
func (fi bindataFileInfo) Sys() interface{} {
return nil
}

var _bindataPublicappjs = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2a\xcf\xcc\x4b\xc9\x2f\xd7\x4b\xcc\x49\x2d\x2a\xd1\x50\x4a\x2c\x28\xd0" +
"\xcb\x2a\x56\xc8\xc9\x4f\x4c\x49\x4d\x51\x48\x2b\xca\xcf\x55\x88\x51\xd2\x57\xd2\xb4\x06\x04\x00\x00\xff\xff\xa9" +
"\x06\xf7\xa3\x27\x00\x00\x00")
type assetFile struct {
*bytes.Reader
name string
childInfos []os.FileInfo
childInfoOffset int
}

type assetOperator struct{}

// Open implement http.FileSystem interface
func (f *assetOperator) Open(name string) (http.File, error) {
var err error
if len(name) > 0 && name[0] == '/' {
name = name[1:]
}
content, err := Asset(name)
if err == nil {
return &assetFile{name: name, Reader: bytes.NewReader(content)}, nil
}
children, err := AssetDir(name)
if err == nil {
childInfos := make([]os.FileInfo, 0, len(children))
for _, child := range children {
childPath := filepath.Join(name, child)
info, errInfo := AssetInfo(filepath.Join(name, child))
if errInfo == nil {
childInfos = append(childInfos, info)
} else {
childInfos = append(childInfos, newDirFileInfo(childPath))
}
}
return &assetFile{name: name, childInfos: childInfos}, nil
} else {
// If the error is not found, return an error that will
// result in a 404 error. Otherwise the server returns
// a 500 error for files not found.
if strings.Contains(err.Error(), "not found") {
return nil, os.ErrNotExist
}
return nil, err
}
}

// Close no need do anything
func (f *assetFile) Close() error {
return nil
}

// Readdir read dir's children file info
func (f *assetFile) Readdir(count int) ([]os.FileInfo, error) {
if len(f.childInfos) == 0 {
return nil, os.ErrNotExist
}
if count <= 0 {
return f.childInfos, nil
}
if f.childInfoOffset+count > len(f.childInfos) {
count = len(f.childInfos) - f.childInfoOffset
}
offset := f.childInfoOffset
f.childInfoOffset += count
return f.childInfos[offset : offset+count], nil
}

func bindataPublicappjsBytes() ([]byte, error) {
// Stat read file info from asset item
func (f *assetFile) Stat() (os.FileInfo, error) {
if len(f.childInfos) != 0 {
return newDirFileInfo(f.name), nil
}
return AssetInfo(f.name)
}

// newDirFileInfo return default dir file info
func newDirFileInfo(name string) os.FileInfo {
return &bindataFileInfo{
name: name,
size: 0,
mode: os.FileMode(2147484068), // equal os.FileMode(0644)|os.ModeDir
modTime: time.Time{}}
}

// AssetFile return a http.FileSystem instance that data backend by asset
func AssetFile() http.FileSystem {
return &assetOperator{}
}

var _publicAppJs = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2a\xcf\xcc\x4b\xc9\x2f\xd7\x4b\xcc\x49\x2d\x2a\xd1\x50\x4a\x2c\x28\xd0\xcb\x2a\x56\xc8\xc9\x4f\x4c\x49\x4d\x51\x48\x2b\xca\xcf\x55\x88\x51\xd2\x57\xd2\xb4\x06\x04\x00\x00\xff\xff\xa9\x06\xf7\xa3\x27\x00\x00\x00"

func publicAppJsBytes() ([]byte, error) {
return bindataRead(
_bindataPublicappjs,
_publicAppJs,
"public/app.js",
)
}

func bindataPublicappjs() (*asset, error) {
bytes, err := bindataPublicappjsBytes()
func publicAppJs() (*asset, error) {
bytes, err := publicAppJsBytes()
if err != nil {
return nil, err
}

info := bindataFileInfo{
name: "public/app.js",
size: 39,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1565946441, 0),
}

info := bindataFileInfo{name: "public/app.js", size: 39, mode: os.FileMode(438), modTime: time.Unix(1595516291, 0)}
a := &asset{bytes: bytes, info: info}

return a, nil
}

var _bindataPublicapp2indexhtml = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x34\x8d\x41\x0a\xc2\x40\x0c\x45\xf7\x81\xdc\xe1\x9f\xc0\xd0\xae\x43\xc0" +
"\x9d\xd7\xa8\x4c\x24\x85\xd4\x09\x32\x0b\xbd\xbd\xb4\xd6\xe5\x87\xf7\xde\xd7\x18\x5b\x1a\x13\x93\x86\x2f\xcd\x98" +
"\x00\x40\xc7\x3a\xd2\xed\x5a\x85\x59\xe5\x37\x98\x54\x4e\x84\x49\xef\xbd\x7d\xfe\x70\x4c\x86\x9b\x67\x76\x3c\x5e" +
"\x7d\xc3\x52\x35\xcb\xfa\x6c\xfe\xbe\xec\x71\xa8\xc4\x74\xd8\xa7\x73\x84\xf6\xd7\x6f\x00\x00\x00\xff\xff\xfd\x28" +
"\x92\x95\x7c\x00\x00\x00")
var _publicApp2IndexHtml = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x34\x8d\x41\x0a\xc2\x40\x0c\x45\xf7\x81\xdc\xe1\x9f\xc0\xd0\xae\x43\xc0\x9d\xd7\xa8\x4c\x24\x85\xd4\x09\x32\x0b\xbd\xbd\xb4\xd6\xe5\x87\xf7\xde\xd7\x18\x5b\x1a\x13\x93\x86\x2f\xcd\x98\x00\x40\xc7\x3a\xd2\xed\x5a\x85\x59\xe5\x37\x98\x54\x4e\x84\x49\xef\xbd\x7d\xfe\x70\x4c\x86\x9b\x67\x76\x3c\x5e\x7d\xc3\x52\x35\xcb\xfa\x6c\xfe\xbe\xec\x71\xa8\xc4\x74\xd8\xa7\x73\x84\xf6\xd7\x6f\x00\x00\x00\xff\xff\xfd\x28\x92\x95\x7c\x00\x00\x00"

func bindataPublicapp2indexhtmlBytes() ([]byte, error) {
func publicApp2IndexHtmlBytes() ([]byte, error) {
return bindataRead(
_bindataPublicapp2indexhtml,
_publicApp2IndexHtml,
"public/app2/index.html",
)
}

func bindataPublicapp2indexhtml() (*asset, error) {
bytes, err := bindataPublicapp2indexhtmlBytes()
func publicApp2IndexHtml() (*asset, error) {
bytes, err := publicApp2IndexHtmlBytes()
if err != nil {
return nil, err
}

info := bindataFileInfo{
name: "public/app2/index.html",
size: 124,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1571953700, 0),
}

info := bindataFileInfo{name: "public/app2/index.html", size: 124, mode: os.FileMode(438), modTime: time.Unix(1572105320, 0)}
a := &asset{bytes: bytes, info: info}

return a, nil
}

var _bindataPubliccssmaincss = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xca\x4f\xa9\x54\xa8\xe6\xe5\x52\x50\x50\x50\x48\x4a\x4c\xce\x4e\x2f" +
"\xca\x2f\xcd\x4b\xd1\x4d\xce\xcf\xc9\x2f\xb2\x52\x48\xca\x49\x4c\xce\xb6\xe6\xe5\xaa\xe5\xe5\x02\x04\x00\x00\xff" +
"\xff\x03\x25\x9c\x89\x29\x00\x00\x00")
var _publicCssMainCss = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\xca\x4f\xa9\x54\xa8\xe6\xe5\x52\x50\x50\x50\x48\x4a\x4c\xce\x4e\x2f\xca\x2f\xcd\x4b\xd1\x4d\xce\xcf\xc9\x2f\xb2\x52\x48\xca\x49\x4c\xce\xb6\xe6\xe5\xaa\xe5\xe5\x02\x04\x00\x00\xff\xff\x03\x25\x9c\x89\x29\x00\x00\x00"

func bindataPubliccssmaincssBytes() ([]byte, error) {
func publicCssMainCssBytes() ([]byte, error) {
return bindataRead(
_bindataPubliccssmaincss,
_publicCssMainCss,
"public/css/main.css",
)
}

func bindataPubliccssmaincss() (*asset, error) {
bytes, err := bindataPubliccssmaincssBytes()
func publicCssMainCss() (*asset, error) {
bytes, err := publicCssMainCssBytes()
if err != nil {
return nil, err
}

info := bindataFileInfo{
name: "public/css/main.css",
size: 41,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1565946441, 0),
}

info := bindataFileInfo{name: "public/css/main.css", size: 41, mode: os.FileMode(438), modTime: time.Unix(1565946441, 0)}
a := &asset{bytes: bytes, info: info}

return a, nil
}

var _bindataPublicindexhtml = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x34\x8e\x41\x0e\xc2\x20\x10\x45\xf7\x24\xdc\xe1\xa7\x07\x80\x74\x3f\xb2" +
"\x76\xe9\xc2\x0b\x60\x41\xc1\x50\x21\xc0\x42\xd3\xf4\xee\x06\x4a\x97\x93\xf7\x66\xde\x90\xab\x6b\x50\x9c\x71\x46" +
"\xce\x6a\xa3\x38\x03\x00\xaa\xbe\x06\xab\xb6\x0d\xe2\xa6\x5f\x56\xdc\xdb\x88\x7d\x27\x79\x00\xce\x48\x0e\x9d\x33" +
"\x7a\x44\xf3\x3b\x17\xdd\xac\x70\xb5\x21\x44\x3c\x73\x5c\xe1\x3f\xc6\x7e\x45\x6b\x80\xa4\x9b\xbb\x3f\xcc\xb2\x64" +
"\x9f\x2a\x4a\x5e\x2e\x93\xd4\x29\x89\x77\x99\x14\x40\xf2\x00\xbd\x31\x2e\xf7\x5c\xfb\xf3\x1f\x00\x00\xff\xff\x25" +
"\xe9\x37\x57\xae\x00\x00\x00")
var _publicIndexHtml = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x34\x8e\x41\x0e\xc2\x20\x10\x45\xf7\x24\xdc\xe1\xa7\x07\x80\x74\x3f\xb2\x76\xe9\xc2\x0b\x60\x41\xc1\x50\x21\xc0\x42\xd3\xf4\xee\x06\x4a\x97\x93\xf7\x66\xde\x90\xab\x6b\x50\x9c\x71\x46\xce\x6a\xa3\x38\x03\x00\xaa\xbe\x06\xab\xb6\x0d\xe2\xa6\x5f\x56\xdc\xdb\x88\x7d\x27\x79\x00\xce\x48\x0e\x9d\x33\x7a\x44\xf3\x3b\x17\xdd\xac\x70\xb5\x21\x44\x3c\x73\x5c\xe1\x3f\xc6\x7e\x45\x6b\x80\xa4\x9b\xbb\x3f\xcc\xb2\x64\x9f\x2a\x4a\x5e\x2e\x93\xd4\x29\x89\x77\x99\x14\x40\xf2\x00\xbd\x31\x2e\xf7\x5c\xfb\xf3\x1f\x00\x00\xff\xff\x25\xe9\x37\x57\xae\x00\x00\x00"

func bindataPublicindexhtmlBytes() ([]byte, error) {
func publicIndexHtmlBytes() ([]byte, error) {
return bindataRead(
_bindataPublicindexhtml,
_publicIndexHtml,
"public/index.html",
)
}

func bindataPublicindexhtml() (*asset, error) {
bytes, err := bindataPublicindexhtmlBytes()
func publicIndexHtml() (*asset, error) {
bytes, err := publicIndexHtmlBytes()
if err != nil {
return nil, err
}

info := bindataFileInfo{
name: "public/index.html",
size: 174,
md5checksum: "",
mode: os.FileMode(438),
modTime: time.Unix(1565946441, 0),
}

info := bindataFileInfo{name: "public/index.html", size: 174, mode: os.FileMode(438), modTime: time.Unix(1565946441, 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 {
@@ -222,14 +260,11 @@ func Asset(name string) ([]byte, error) {
}
return a.bytes, nil
}
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
return nil, fmt.Errorf("Asset %s not found", name)
}

//
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
// nolint: deadcode
//
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
@@ -239,10 +274,9 @@ func MustAsset(name string) []byte {
return a
}

//
// 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.
//
// 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 {
@@ -252,13 +286,10 @@ func AssetInfo(name string) (os.FileInfo, error) {
}
return a.info, nil
}
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
return nil, fmt.Errorf("AssetInfo %s not found", name)
}

//
// AssetNames returns the names of the assets.
// nolint: deadcode
//
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
@@ -267,17 +298,14 @@ func AssetNames() []string {
return names
}

//
// _bindata is a table, holding each asset generator, mapped to its name.
//
var _bindata = map[string]func() (*asset, error){
"public/app.js": bindataPublicappjs,
"public/app2/index.html": bindataPublicapp2indexhtml,
"public/css/main.css": bindataPubliccssmaincss,
"public/index.html": bindataPublicindexhtml,
"public/app.js": publicAppJs,
"public/app2/index.html": publicApp2IndexHtml,
"public/css/main.css": publicCssMainCss,
"public/index.html": publicIndexHtml,
}

//
// 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
@@ -291,7 +319,6 @@ var _bindata = map[string]func() (*asset, error){
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
//
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
@@ -300,20 +327,12 @@ func AssetDir(name string) ([]string, error) {
for _, p := range pathList {
node = node.Children[p]
if node == nil {
return nil, &os.PathError{
Op: "open",
Path: name,
Err: os.ErrNotExist,
}
return nil, fmt.Errorf("Asset %s not found", name)
}
}
}
if node.Func != nil {
return nil, &os.PathError{
Op: "open",
Path: name,
Err: os.ErrNotExist,
}
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for childName := range node.Children {
@@ -327,16 +346,16 @@ type bintree struct {
Children map[string]*bintree
}

var _bintree = &bintree{Func: nil, Children: map[string]*bintree{
"public": {Func: nil, Children: map[string]*bintree{
"app.js": {Func: bindataPublicappjs, Children: map[string]*bintree{}},
"app2": {Func: nil, Children: map[string]*bintree{
"index.html": {Func: bindataPublicapp2indexhtml, Children: map[string]*bintree{}},
var _bintree = &bintree{nil, map[string]*bintree{
"public": {nil, map[string]*bintree{
"app.js": {publicAppJs, map[string]*bintree{}},
"app2": {nil, map[string]*bintree{
"index.html": {publicApp2IndexHtml, map[string]*bintree{}},
}},
"css": {Func: nil, Children: map[string]*bintree{
"main.css": {Func: bindataPubliccssmaincss, Children: map[string]*bintree{}},
"css": {nil, map[string]*bintree{
"main.css": {publicCssMainCss, map[string]*bintree{}},
}},
"index.html": {Func: bindataPublicindexhtml, Children: map[string]*bintree{}},
"index.html": {publicIndexHtml, map[string]*bintree{}},
}},
}}

@@ -358,7 +377,11 @@ func RestoreAsset(dir, name string) error {
if err != nil {
return err
}
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
if err != nil {
return err
}
return nil
}

// RestoreAssets restores an asset under the given directory recursively


+ 8
- 7
_examples/file-server/single-page-application/embedded-single-page-application/main.go View File

@@ -4,8 +4,8 @@ import (
"github.com/kataras/iris/v12"
)

// $ go get -u github.com/go-bindata/go-bindata/...
// $ go-bindata ./public/...
// $ go get -u github.com/go-bindata/go-bindata/v3/go-bindata