You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
urfave-cli/flag-gen/assets_vfsdata.go

215 lines
13 KiB

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