3681b057c5
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
215 lines
13 KiB
Go
215 lines
13 KiB
Go
// Code generated by vfsgen; DO NOT EDIT.
|
||
|
||
package main
|
||
|
||
import (
|
||
"bytes"
|
||
"compress/gzip"
|
||
"fmt"
|
||
"io"
|
||
"io/ioutil"
|
||
"net/http"
|
||
"os"
|
||
pathpkg "path"
|
||
"time"
|
||
)
|
||
|
||
// assets statically implements the virtual filesystem provided to vfsgen.
|
||
var assets = func() http.FileSystem {
|
||
fs := vfsgen۰FS{
|
||
"/": &vfsgen۰DirInfo{
|
||
name: "/",
|
||
modTime: time.Time{},
|
||
},
|
||
"/source": &vfsgen۰DirInfo{
|
||
name: "source",
|
||
modTime: time.Time{},
|
||
},
|
||
"/source/flag-types.json": &vfsgen۰CompressedFileInfo{
|
||
name: "flag-types.json",
|
||
modTime: time.Time{},
|
||
uncompressedSize: 3686,
|
||
|
||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x95\x41\x6f\x9b\x40\x10\x85\xef\xfc\x8a\xe9\x56\x95\xa0\xb2\x20\x07\xcb\x07\x4b\xbd\x54\x55\x2b\xdf\x2a\xb9\xe9\x25\x44\xd6\x06\x16\xb2\xca\x7a\x17\x2d\x43\xd4\xc8\xf2\x7f\xaf\x16\x8c\x0d\x6b\xb0\x4d\x23\x23\xf7\x92\xc3\x9b\x2c\x33\xef\xcb\x9b\xcc\x83\x03\xb0\x71\x00\x00\x88\xa4\x6b\x46\xe6\x40\xbe\x2a\x25\xc8\xa4\xd2\xf0\x2d\x2b\xb5\xa7\x86\xf6\x4a\x45\x61\xc4\x84\x8a\x9c\xed\xb4\x98\xe5\x48\xe6\x80\xba\xa8\x95\x48\x49\x64\x7f\x70\x15\xb3\x84\x16\xc2\x14\x49\xf9\xa0\xfe\x4a\x46\x75\xce\xb4\x91\x73\xd4\x91\x92\xaf\xfe\x4f\xa3\x98\xe6\x6e\xe2\xff\x36\x3d\xfc\x25\x6a\x2e\x53\xd7\xf3\x5a\xad\x2b\xd5\xbc\xd4\x0c\x0b\x2d\x21\x24\x21\xd9\x0f\x4c\x5f\x58\xbe\x4a\xb8\xd8\x4f\xe8\x00\x6c\x27\xdd\x2e\x7f\xbd\xdf\x66\xac\x22\xa4\x5c\x98\xc7\x80\xcf\x14\x81\xe7\x65\x19\x9e\xde\xa0\xb6\xfe\x9f\x10\xf9\x56\x68\x8a\x5c\x49\x1b\x0a\xf2\x35\xf3\xed\x62\x4d\xa7\x89\xe2\x24\x1c\x37\x67\x0c\x9e\x11\xb3\x7c\x1e\x04\xa9\x12\x54\xa6\xbe\xd2\x69\x90\xbd\xa4\x81\xe9\x10\x7c\x2c\xdd\xd6\x7d\xbc\x13\xd4\xee\x8e\x89\x95\x33\xb6\x3e\x30\x14\x99\xfd\xeb\x83\xf1\x7d\x17\x8a\xe2\x6c\x6a\xd3\x4b\xda\xf2\x45\xdc\x2e\xf3\xdc\x4a\x49\xd9\xfd\xc8\xf3\x04\x66\xd3\x73\xbe\xd7\xe8\x2f\x33\xcd\x25\x26\x6e\x48\x3e\x25\x21\x99\xd4\x2c\x86\x33\xf8\xc1\x24\xd3\x3c\xb2\x19\x58\x72\x3f\x83\xe6\xae\x75\x40\x90\x5c\xd8\xb1\xa8\x5b\x70\x89\x4c\x27\x34\x62\x9b\x6d\x8f\x5f\x9e\xd4\xbe\xe0\xc3\x17\x90\x5c\xc0\x26\x94\x21\x86\xd8\x13\x00\x53\xdc\x9a\x1f\xe7\x76\xca\xd8\xe8\xe1\xb1\x90\x1d\x89\xe0\x72\x84\x3c\x2c\x64\x57\x1a\xee\x86\x07\x22\x7e\x57\x20\x16\x12\x3b\xec\xdf\x82\xf9\xea\xe9\x2a\xa2\x65\x3f\x33\x95\x5b\x4a\xf1\xc8\x78\x96\x82\x47\xcc\x66\xf4\xd9\x2e\x5c\x63\x65\x1e\x1e\x1b\x7f\x8a\x03\xc9\x3d\x39\x77\x3f\x85\xe7\x55\x92\xa1\xc8\xb4\x56\xda\x95\x5c\xf4\x71\xba\xda\x9e\x9d\x01\x39\x9b\xf6\xa2\xb4\x4a\x57\x83\x79\x58\xeb\x3e\x9c\xbb\x49\x6e\x1f\xe8\xae\xbd\x05\x33\x6f\xa9\xff\xba\xbe\xcd\x81\x0e\xa0\x8e\x17\xf6\x2c\x99\x36\x80\xa1\xff\x9c\xab\xef\x74\x87\xa6\xa3\x76\x9d\xd4\xb4\x89\x76\xc6\xa6\x31\xcb\x6d\xe4\xe6\x04\xd3\x7b\xde\x75\xf1\x8a\x51\x4e\x9e\xe9\x7d\x0b\x37\xef\x9e\x1f\x1f\xbd\x62\x84\xab\x77\x91\x7f\xeb\xec\x15\x23\xdc\x3d\xe7\xd1\xf9\x1b\x00\x00\xff\xff\xc7\xe4\x19\x16\x66\x0e\x00\x00"),
|
||
},
|
||
"/templates": &vfsgen۰DirInfo{
|
||
name: "templates",
|
||
modTime: time.Time{},
|
||
},
|
||
"/templates/altsrc_flags_generated.gotpl": &vfsgen۰CompressedFileInfo{
|
||
name: "altsrc_flags_generated.gotpl",
|
||
modTime: time.Time{},
|
||
uncompressedSize: 1044,
|
||
|
||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x92\x4f\x8b\xdb\x30\x10\xc5\xcf\xd6\xa7\x78\x84\xa5\xc4\x4b\xb0\xef\x29\x7b\x28\xdd\x2d\xf4\x92\x2d\xec\x42\xcf\x8a\x3c\xb2\x45\x15\xdb\x48\xe3\x84\x20\xfc\xdd\xcb\x38\x61\xfb\x4f\x29\xbd\xf4\x66\x69\xf4\xde\x9b\xdf\x8c\xeb\x1a\x1f\x87\x86\xd0\x52\x4f\x41\x33\x35\xd8\x9f\x61\xdb\xf7\x78\x7c\xc6\xee\xf9\x15\x4f\x8f\x9f\x5f\x2b\xa5\x46\x6d\xbe\xe9\x96\x90\x12\xaa\x2f\x97\xef\x9d\x3e\x10\xe6\x59\x29\x77\x18\x87\xc0\x58\xab\x62\x65\xbd\x6e\x57\xaa\x58\xb5\x8e\xbb\x69\x5f\x99\xe1\x50\x4f\xc1\xea\x23\xd5\xc6\xbb\x95\x2a\x55\x4a\x08\xba\x6f\x09\x77\x6e\x83\x3b\x79\x8e\xed\x03\xaa\x4f\x5e\xb7\x51\xcc\xea\x5a\x22\x96\x42\x75\x0d\x90\x1a\x5c\x04\x77\x84\x45\xc0\xe7\x91\xc0\x9d\x66\x9c\x82\x1e\x23\x8c\x77\x55\x56\xc4\x03\xb4\xf7\xc3\x49\x5c\xed\x10\x30\x70\x47\x01\x47\xed\x27\x8a\x52\xdc\x13\xe2\x48\xc6\x59\x47\x8d\x5a\x5c\xb3\x36\x91\xc3\x64\x18\x49\x15\xb7\x92\x54\x11\x89\x71\xbf\x5c\xcb\xf9\x85\x58\xcd\x4a\x62\x77\x74\xca\x7a\x9a\x40\x9a\x29\x42\xa3\xa7\x53\x36\x56\xd9\xa9\x37\xb7\xf4\x6b\xeb\x6f\x62\x97\xb8\xcf\x46\x26\x55\x04\xe2\x29\xf4\x78\x97\xab\xa7\x6c\x17\x5b\x58\xbf\x41\x24\xde\xa2\x77\x1e\xf3\x15\xeb\xc3\x38\xfa\x33\xa2\x3e\xd2\x8f\xbd\xbc\x10\x2f\x53\xf6\x9a\x29\x60\x8a\xf2\xbb\x18\xed\x7d\xdc\xc8\x93\xfe\xf2\x2d\x62\x11\xc8\xe6\x46\x6a\xb2\x99\xd5\xe2\x7e\xe1\x5f\xdb\x3c\x4d\x79\x69\x61\xfd\xc7\xdc\x4b\xe1\xb4\x95\xdc\x3f\x48\xdf\x72\xb8\x1d\x22\xfa\xf2\x67\xa6\xaf\x8e\xbb\xa7\x10\x86\xf0\x7f\xe1\xde\x62\xfe\x89\xf2\xed\x75\x0e\x97\x96\x6e\x7f\x87\xbe\x6e\xfa\x6f\xec\xbf\xb8\xca\x10\x52\x02\xf5\x0d\xe6\xf9\x7b\x00\x00\x00\xff\xff\x6d\x3d\x9e\xe0\x14\x04\x00\x00"),
|
||
},
|
||
"/templates/cli_flags_generated.gotpl": &vfsgen۰CompressedFileInfo{
|
||
name: "cli_flags_generated.gotpl",
|
||
modTime: time.Time{},
|
||
uncompressedSize: 2638,
|
||
|
||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xe3\x36\x10\x3d\x4b\xbf\x62\x6a\xec\x41\x0a\x5c\xfb\xde\xc5\x9e\xe2\xcd\x76\x81\x62\x37\xe8\xa6\xb9\xd3\xd2\x50\x26\x42\x93\x0a\x39\x4a\x1a\x18\xfe\xef\xc5\x90\xd4\x87\x3f\x10\xfb\x92\x9e\x2c\x72\x66\xde\x7b\x7c\x33\xa4\x97\x4b\xb8\xb5\x35\x42\x83\x06\x9d\x20\xac\x61\xfd\x06\xb2\xf9\x0c\xab\x9f\xf0\xe3\xe7\x03\x7c\x5d\x7d\x7f\x58\xe4\x79\x2b\xaa\x27\xd1\x20\xec\x76\xb0\xb8\x8f\xdf\x3f\xc4\x16\x61\xbf\xcf\x73\xb5\x6d\xad\x23\x28\xf2\x6c\x26\xb5\x68\x66\xfc\xbb\x25\xfe\xf1\xe4\x2a\x6b\x5e\xf8\x93\xd4\x16\x67\x79\x99\xef\x76\xe0\x84\x69\x10\x3e\xa9\x39\x7c\xe2\x7c\xf8\xe3\x0b\x2c\xee\xb4\x68\x3c\xa3\x2d\x97\xcc\x11\x02\x8b\xc4\xc0\x31\x50\x1e\x04\x84\xf4\x57\x45\x1b\xa0\xb7\x16\xc7\xc4\x07\x5e\xed\xf7\xc3\x7a\x65\x2b\x12\x4a\x33\xde\x61\xe2\x14\xd1\x93\xeb\x2a\x82\x5d\x9e\xf1\x6e\x96\x79\x72\xca\x34\x79\xf6\x8f\x17\xcd\x64\xf9\xd5\xbc\x3c\x0a\x37\xae\xef\x94\xc6\x7b\x41\x9b\x61\xe3\x6f\x7c\xee\x94\xc3\x3a\x5b\x5b\xab\xf3\xec\x4f\x55\xd7\x68\xb2\xb4\xda\xed\x7e\x07\x25\x01\x9f\x7b\xa5\xe2\x09\x3d\x43\x00\xb9\x2e\xd8\x97\x0d\x5b\x93\x12\x34\x75\x88\x1d\x97\x3f\x0a\xdd\x4d\x4a\xc3\x32\x3b\xb6\xe1\x7d\x88\x15\x7a\x52\x46\x90\xb2\x66\x04\x9a\x6c\x66\x37\xef\xe2\xed\x73\x6e\xd1\xaf\x70\x76\x70\x48\x9d\x33\xdc\x19\x87\xa2\x16\x6b\x8d\xe0\xb0\x75\xe8\xd1\x50\x64\xb0\x12\x68\xa3\x3c\xbc\xb0\x52\xae\x2c\xa4\x75\xd0\xb1\xc5\x50\xa3\x14\x9d\x26\x5f\xe6\xb2\x33\x15\x14\xf2\x6c\x9f\xca\x44\x56\x94\x10\x1d\xe7\x8e\x45\x62\xe0\x78\x8c\xa2\x2b\x64\x99\xc4\x7d\x43\x0a\xf5\xbd\x3a\xda\x20\x18\xde\x08\x62\x30\x4c\xd1\x05\xca\x04\x71\x8e\x53\x86\xcc\x44\xf5\xdd\xf7\xdd\x1f\xd8\x5e\x37\x48\x1b\x74\x60\x1d\x18\x4b\x03\x21\x0f\xb0\x4b\xb9\x17\xc8\x47\xd0\xa2\x04\x9e\x89\x03\xf6\x3e\x96\x14\x84\xe9\x89\x63\x31\x9c\x97\xbb\x3a\x39\x2b\x10\xe7\x80\x88\x4d\x98\x83\x65\x7d\xaf\xca\x23\x48\xa1\x3d\x5e\x50\x33\x12\x9c\xaa\x19\x2a\xa2\x80\x61\x3c\xbe\x21\x85\x5b\x74\xd0\x82\xd8\xf4\xe4\x27\x4f\xc1\xf5\xbd\x08\x60\xe7\x9b\x11\x42\x23\xed\x91\x13\x89\x21\xcd\x1f\x08\xdf\x43\x1c\x8d\xa9\x30\x35\x08\x03\xb8\x6d\xe9\x8d\x91\x52\x96\x3a\x31\xd1\xd8\x1e\x8a\x40\x68\xbd\xb8\xac\xbd\xb7\x6e\xd4\x7e\xe8\x5a\xba\x4a\x83\x77\xc7\x40\xa0\xad\x7d\xf2\xd0\xb5\x41\x4a\x24\xb7\x12\x04\x68\x5b\x09\x7d\x96\x77\xde\x1b\x70\x80\x77\x6b\x0d\xe1\xbf\xb4\x8a\xb7\x8e\x91\x95\x0c\x23\x2a\x6d\x67\xfa\x99\xac\xe0\x26\xe5\x95\x27\xd0\x45\xb8\x44\xf1\x1c\x21\xca\xf5\x08\x3d\x70\x78\x2d\x66\xb3\xe9\x3b\x3c\x8d\x84\x6d\xd4\xfe\xe0\xa1\x1e\x22\xfd\xfb\x32\xe9\x2d\x9f\xbb\x6b\xcf\x8a\x98\x43\xb5\xe0\xcd\x5f\x48\xc3\xa5\xd7\x76\x2d\xf4\xd5\xe6\x35\x21\xfd\x23\xdd\x3b\x2f\xe8\xff\xf2\x50\x49\x90\x9e\xff\x59\xa3\x8b\x51\xcc\x5d\xb4\xac\xb7\xb0\xfc\xcc\x39\xbf\x7d\x01\xa3\xc2\xa5\xbe\xca\x78\xe9\xcb\x3c\xdb\x9f\xbe\x00\x27\xfe\x70\x5f\x82\x2b\xef\xc0\x25\x23\xe6\xe0\x91\xe0\x26\x84\x93\xc6\x8f\xf4\x46\xb2\x2f\x1e\x69\xf1\x57\x50\x16\x94\x94\xd1\xb2\xa9\x1b\xa3\x80\x7b\xe1\x3c\xba\xc8\xdd\xf2\x77\x3d\x07\x74\x8e\x61\x06\xa6\x94\x33\x55\x71\x94\x2a\xe3\x7d\x0f\x6b\xeb\x0a\xa3\x74\xc9\xb9\xe9\x6f\x9a\xe9\x39\x71\x22\xe0\x0a\x8f\x33\x6e\xc5\x89\xd2\x5b\xe1\x29\xaa\x3d\x46\x98\xc4\xa7\x4a\x53\x5a\x14\x3c\x11\x75\x65\x9f\xc7\x8a\xff\x02\x00\x00\xff\xff\x73\xc9\x52\x5f\x4e\x0a\x00\x00"),
|
||
},
|
||
}
|
||
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
|
||
fs["/source"].(os.FileInfo),
|
||
fs["/templates"].(os.FileInfo),
|
||
}
|
||
fs["/source"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
|
||
fs["/source/flag-types.json"].(os.FileInfo),
|
||
}
|
||
fs["/templates"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
|
||
fs["/templates/altsrc_flags_generated.gotpl"].(os.FileInfo),
|
||
fs["/templates/cli_flags_generated.gotpl"].(os.FileInfo),
|
||
}
|
||
|
||
return fs
|
||
}()
|
||
|
||
type vfsgen۰FS map[string]interface{}
|
||
|
||
func (fs vfsgen۰FS) Open(path string) (http.File, error) {
|
||
path = pathpkg.Clean("/" + path)
|
||
f, ok := fs[path]
|
||
if !ok {
|
||
return nil, &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist}
|
||
}
|
||
|
||
switch f := f.(type) {
|
||
case *vfsgen۰CompressedFileInfo:
|
||
gr, err := gzip.NewReader(bytes.NewReader(f.compressedContent))
|
||
if err != nil {
|
||
// This should never happen because we generate the gzip bytes such that they are always valid.
|
||
panic("unexpected error reading own gzip compressed bytes: " + err.Error())
|
||
}
|
||
return &vfsgen۰CompressedFile{
|
||
vfsgen۰CompressedFileInfo: f,
|
||
gr: gr,
|
||
}, nil
|
||
case *vfsgen۰DirInfo:
|
||
return &vfsgen۰Dir{
|
||
vfsgen۰DirInfo: f,
|
||
}, nil
|
||
default:
|
||
// This should never happen because we generate only the above types.
|
||
panic(fmt.Sprintf("unexpected type %T", f))
|
||
}
|
||
}
|
||
|
||
// vfsgen۰CompressedFileInfo is a static definition of a gzip compressed file.
|
||
type vfsgen۰CompressedFileInfo struct {
|
||
name string
|
||
modTime time.Time
|
||
compressedContent []byte
|
||
uncompressedSize int64
|
||
}
|
||
|
||
func (f *vfsgen۰CompressedFileInfo) Readdir(count int) ([]os.FileInfo, error) {
|
||
return nil, fmt.Errorf("cannot Readdir from file %s", f.name)
|
||
}
|
||
func (f *vfsgen۰CompressedFileInfo) Stat() (os.FileInfo, error) { return f, nil }
|
||
|
||
func (f *vfsgen۰CompressedFileInfo) GzipBytes() []byte {
|
||
return f.compressedContent
|
||
}
|
||
|
||
func (f *vfsgen۰CompressedFileInfo) Name() string { return f.name }
|
||
func (f *vfsgen۰CompressedFileInfo) Size() int64 { return f.uncompressedSize }
|
||
func (f *vfsgen۰CompressedFileInfo) Mode() os.FileMode { return 0444 }
|
||
func (f *vfsgen۰CompressedFileInfo) ModTime() time.Time { return f.modTime }
|
||
func (f *vfsgen۰CompressedFileInfo) IsDir() bool { return false }
|
||
func (f *vfsgen۰CompressedFileInfo) Sys() interface{} { return nil }
|
||
|
||
// vfsgen۰CompressedFile is an opened compressedFile instance.
|
||
type vfsgen۰CompressedFile struct {
|
||
*vfsgen۰CompressedFileInfo
|
||
gr *gzip.Reader
|
||
grPos int64 // Actual gr uncompressed position.
|
||
seekPos int64 // Seek uncompressed position.
|
||
}
|
||
|
||
func (f *vfsgen۰CompressedFile) Read(p []byte) (n int, err error) {
|
||
if f.grPos > f.seekPos {
|
||
// Rewind to beginning.
|
||
err = f.gr.Reset(bytes.NewReader(f.compressedContent))
|
||
if err != nil {
|
||
return 0, err
|
||
}
|
||
f.grPos = 0
|
||
}
|
||
if f.grPos < f.seekPos {
|
||
// Fast-forward.
|
||
_, err = io.CopyN(ioutil.Discard, f.gr, f.seekPos-f.grPos)
|
||
if err != nil {
|
||
return 0, err
|
||
}
|
||
f.grPos = f.seekPos
|
||
}
|
||
n, err = f.gr.Read(p)
|
||
f.grPos += int64(n)
|
||
f.seekPos = f.grPos
|
||
return n, err
|
||
}
|
||
func (f *vfsgen۰CompressedFile) Seek(offset int64, whence int) (int64, error) {
|
||
switch whence {
|
||
case io.SeekStart:
|
||
f.seekPos = 0 + offset
|
||
case io.SeekCurrent:
|
||
f.seekPos += offset
|
||
case io.SeekEnd:
|
||
f.seekPos = f.uncompressedSize + offset
|
||
default:
|
||
panic(fmt.Errorf("invalid whence value: %v", whence))
|
||
}
|
||
return f.seekPos, nil
|
||
}
|
||
func (f *vfsgen۰CompressedFile) Close() error {
|
||
return f.gr.Close()
|
||
}
|
||
|
||
// vfsgen۰DirInfo is a static definition of a directory.
|
||
type vfsgen۰DirInfo struct {
|
||
name string
|
||
modTime time.Time
|
||
entries []os.FileInfo
|
||
}
|
||
|
||
func (d *vfsgen۰DirInfo) Read([]byte) (int, error) {
|
||
return 0, fmt.Errorf("cannot Read from directory %s", d.name)
|
||
}
|
||
func (d *vfsgen۰DirInfo) Close() error { return nil }
|
||
func (d *vfsgen۰DirInfo) Stat() (os.FileInfo, error) { return d, nil }
|
||
|
||
func (d *vfsgen۰DirInfo) Name() string { return d.name }
|
||
func (d *vfsgen۰DirInfo) Size() int64 { return 0 }
|
||
func (d *vfsgen۰DirInfo) Mode() os.FileMode { return 0755 | os.ModeDir }
|
||
func (d *vfsgen۰DirInfo) ModTime() time.Time { return d.modTime }
|
||
func (d *vfsgen۰DirInfo) IsDir() bool { return true }
|
||
func (d *vfsgen۰DirInfo) Sys() interface{} { return nil }
|
||
|
||
// vfsgen۰Dir is an opened dir instance.
|
||
type vfsgen۰Dir struct {
|
||
*vfsgen۰DirInfo
|
||
pos int // Position within entries for Seek and Readdir.
|
||
}
|
||
|
||
func (d *vfsgen۰Dir) Seek(offset int64, whence int) (int64, error) {
|
||
if offset == 0 && whence == io.SeekStart {
|
||
d.pos = 0
|
||
return 0, nil
|
||
}
|
||
return 0, fmt.Errorf("unsupported Seek in directory %s", d.name)
|
||
}
|
||
|
||
func (d *vfsgen۰Dir) Readdir(count int) ([]os.FileInfo, error) {
|
||
if d.pos >= len(d.entries) && count > 0 {
|
||
return nil, io.EOF
|
||
}
|
||
if count <= 0 || count > len(d.entries)-d.pos {
|
||
count = len(d.entries) - d.pos
|
||
}
|
||
e := d.entries[d.pos : d.pos+count]
|
||
d.pos += count
|
||
return e, nil
|
||
}
|