mirror of
https://github.com/Luzifer/promcertcheck.git
synced 2024-11-08 16:00:08 +00:00
314 lines
10 KiB
Go
314 lines
10 KiB
Go
// Code generated by go-bindata. DO NOT EDIT.
|
|
// sources:
|
|
// display.html
|
|
|
|
package main
|
|
|
|
|
|
import (
|
|
"bytes"
|
|
"compress/gzip"
|
|
"fmt"
|
|
"io"
|
|
"io/ioutil"
|
|
"os"
|
|
"path/filepath"
|
|
"strings"
|
|
"time"
|
|
)
|
|
|
|
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)
|
|
}
|
|
|
|
var buf bytes.Buffer
|
|
_, err = io.Copy(&buf, gz)
|
|
clErr := gz.Close()
|
|
|
|
if err != nil {
|
|
return nil, fmt.Errorf("Read %q: %v", name, err)
|
|
}
|
|
if clErr != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return buf.Bytes(), nil
|
|
}
|
|
|
|
|
|
type asset struct {
|
|
bytes []byte
|
|
info fileInfoEx
|
|
}
|
|
|
|
type fileInfoEx interface {
|
|
os.FileInfo
|
|
MD5Checksum() string
|
|
}
|
|
|
|
type bindataFileInfo struct {
|
|
name string
|
|
size int64
|
|
mode os.FileMode
|
|
modTime time.Time
|
|
md5checksum string
|
|
}
|
|
|
|
func (fi bindataFileInfo) Name() string {
|
|
return fi.name
|
|
}
|
|
func (fi bindataFileInfo) Size() int64 {
|
|
return fi.size
|
|
}
|
|
func (fi bindataFileInfo) Mode() os.FileMode {
|
|
return fi.mode
|
|
}
|
|
func (fi bindataFileInfo) ModTime() time.Time {
|
|
return fi.modTime
|
|
}
|
|
func (fi bindataFileInfo) MD5Checksum() string {
|
|
return fi.md5checksum
|
|
}
|
|
func (fi bindataFileInfo) IsDir() bool {
|
|
return false
|
|
}
|
|
func (fi bindataFileInfo) Sys() interface{} {
|
|
return nil
|
|
}
|
|
|
|
var _bindataDisplayhtml = []byte(
|
|
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x56\xdd\x73\xdb\x38\x0e\x7f\xef\x5f\x81\x6a\x26\x93\x36\x13\x89\x76" +
|
|
"\xd2\xdc\xf5\x7c\x92\x67\x7a\x69\xe6\x9a\xdd\x36\xed\x36\xd9\xaf\xe9\xf4\x81\x16\x21\x8b\x2e\x45\xaa\x04\xe4\xc4" +
|
|
"\xeb\xe6\x7f\xdf\xa1\xe4\xaf\x38\x4e\xb6\x7d\x91\x0d\x10\xf8\xe1\x9b\x60\xfa\xf4\xf5\xfb\xd3\xab\x3f\x3f\x9c\x41" +
|
|
"\xc9\x95\x19\x3e\x49\xc3\x0f\x18\x69\xc7\x59\x84\x36\x1a\x3e\x01\x48\x4b\x94\x2a\xfc\x01\x48\x2b\x64\x09\x79\x29" +
|
|
"\x3d\x21\x67\x51\xc3\x45\xfc\x32\xda\x3c\x2a\x99\xeb\x18\xbf\x36\x7a\x9a\x45\x7f\xc4\xbf\xbe\x8a\x4f\x5d\x55\x4b" +
|
|
"\xd6\x23\x83\x11\xe4\xce\x32\x5a\xce\xa2\xf3\xb3\x0c\xd5\x18\xef\x68\x5a\x59\x61\x16\x4d\x35\x5e\xd7\xce\xf3\x86" +
|
|
"\xf0\xb5\x56\x5c\x66\x0a\xa7\x3a\xc7\xb8\x25\x0e\x41\x5b\xcd\x5a\x9a\x98\x72\x69\x30\xeb\x2f\x81\x9e\xc6\x31\x5c" +
|
|
"\x95\x08\x72\xe4\xa6\x08\xc7\xd0\x02\xb3\x1c\x13\x1c\x54\x0d\xf1\x01\xe4\xae\x42\x28\xb4\x27\x06\x6d\x81\x4b\x84" +
|
|
"\x10\xdb\x7f\x41\xda\x19\x38\x2e\xd1\xb7\xf4\xd2\x36\x04\xa5\x4e\xe7\x40\x16\x8c\xfe\x20\xa8\x10\x76\x90\x71\xbc" +
|
|
"\xb0\xca\x9a\x0d\x0e\x4f\xd1\xb3\x2e\x74\x2e\x19\x61\x2a\x8d\x56\x92\xb5\xb3\xe0\x91\x1a\xc3\x94\x8a\x4e\xea\xc9" +
|
|
"\xda\xd1\xff\x39\xc7\xc4\x5e\xd6\x6b\x24\xa3\xed\x17\xf0\x68\xb2\x88\x78\x66\x90\x4a\x44\x8e\xa0\xf4\x58\x64\x91" +
|
|
"\x10\x95\xbc\xc9\x95\x4d\x46\x4b\xbd\x40\xe4\xae\x12\x2b\x86\x38\x4e\x8e\x93\x13\x91\x13\xad\x79\x49\xa5\x6d\x92" +
|
|
"\x13\x45\x9b\xa6\xdf\x5c\xbd\x7b\x7b\x02\x54\xea\x0a\xa4\x55\xf0\x11\xa9\x76\x56\x25\x13\x82\xc2\x79\x38\x3f\x7b" +
|
|
"\x09\xd4\xd4\xa1\x0c\xe0\x8a\x85\x30\x1a\xac\xd0\x32\xb5\x0a\x15\x2a\x2d\xe1\x6b\x83\x5e\xe3\x46\x22\x02\xf4\xef" +
|
|
"\xaf\x3e\x5e\x9c\x5f\xfc\x7f\xb0\x09\xaa\x1c\x92\xdd\x67\xb8\x76\xfe\x0b\xe8\x02\x66\xae\x81\x50\xe8\xb6\x00\xb5" +
|
|
"\x1c\x23\x4c\xb5\x84\x42\x1b\x1c\x08\x71\x07\xee\x93\x2e\xc0\x30\x9c\x9f\xc1\x7f\x3e\x77\x5c\x80\x94\x72\xaf\x6b" +
|
|
"\x06\xf2\x79\x16\x85\x7e\xa3\x81\x10\x8e\x28\x59\xe4\x27\xa4\x24\x34\xf1\x09\x95\x7a\x2a\x8e\x93\x7f\x27\x47\x6b" +
|
|
"\xba\x4d\xc7\x84\xa2\x61\x2a\x3a\x98\x1f\x41\xf5\x5d\x48\xa2\x9f\xbc\x48\x8e\x96\xd4\x03\x88\xe9\xd3\x4f\x68\x95" +
|
|
"\x2e\x3e\x77\xe1\xa4\x62\x39\x44\xe9\xc8\xa9\xd9\x42\x46\xe9\x29\xe4\x46\x12\x65\x51\x68\x39\xa9\x2d\xfa\x68\xe5" +
|
|
"\xd1\xc6\xa9\x77\xd7\x11\xb4\x3d\x91\x45\x25\xea\x71\xc9\x83\xa3\x5e\x7d\x13\x8c\x2a\x3d\x5d\x94\xf6\xbe\xca\xea" +
|
|
"\x60\xdb\x96\x89\x2b\x15\xf7\x8f\x56\xb6\xb6\x25\x6a\x69\xd1\x40\xfb\x8d\x15\x16\xb2\x31\x7c\x47\x76\x87\x74\x1c" +
|
|
"\x02\xd4\x76\xbc\x25\x07\xf0\xf8\x60\xdc\x05\xed\xa2\x79\xdc\x4e\xc8\xdf\x3d\x23\x29\xcb\x91\xc1\xa5\x60\x47\xb4" +
|
|
"\xdf\x98\xd8\xeb\x1a\xd5\x3d\x8d\xa0\xe3\xef\x33\x03\xbb\x1c\xbe\x71\xc4\xa9\xe0\x72\x18\x88\x73\xa2\x06\xfd\x8a" +
|
|
"\xfc\x2d\xc4\x00\x8d\x65\x6d\x56\xbc\x8f\x6d\x30\x2d\x79\xdf\x8c\xd8\x65\x67\xbe\xd7\xce\x5a\xe9\x88\x0f\x43\x2e" +
|
|
"\xc2\x7d\xb4\x48\x09\x90\xf3\x8c\x0a\xf6\x6e\x77\x78\x37\xdf\x0b\x13\xe4\x91\x92\x4b\x96\xdc\x10\x64\x19\xe4\xeb" +
|
|
"\x0c\xbf\xff\x79\xb7\xda\x83\xd1\xce\xf7\x00\xcd\x63\x88\x67\x37\xb5\xf6\x48\x97\xce\xd9\x47\xa0\x97\x99\xbf\x96" +
|
|
"\xde\xee\x6a\x82\x95\x29\xc2\xef\x40\x51\xd2\x8e\x37\x26\x61\x1b\x24\xcc\xd5\xc3\x28\x6a\x98\xca\xd1\xc8\x43\x7b" +
|
|
"\xe1\x66\xd1\x7c\xde\xc6\xb6\xd1\x85\xc9\xeb\x8b\xcb\x0b\x59\x21\xc1\x37\x98\x38\x6d\x07\xfb\x87\xb0\x0f\xb7\xb7" +
|
|
"\xd1\x70\x3e\x6f\x0b\x02\xb7\xb7\xa9\x08\x18\xc3\x54\xb0\xda\xe5\x45\x67\x67\x07\x74\xd7\x2b\xc9\xa9\xab\x2a\x67" +
|
|
"\x83\x91\x16\xeb\x07\x41\x2e\x1c\xbf\x0a\xeb\x06\xbe\x01\xeb\x0a\x07\xd1\x51\xaf\xf7\xaf\xb8\xd7\x8f\x7b\x47\xd0" +
|
|
"\x3f\x19\xf4\x5e\x0c\x7a\x27\xf0\xee\xf2\x2a\xfa\x5e\xf0\xae\xb0\xc9\x25\x7b\x6d\xc7\xcf\x9e\x3f\xa2\xf6\x60\xb3" +
|
|
"\xa2\x55\xa1\x5f\xef\x65\x3d\x15\xed\x98\x0d\x7f\x7c\x8e\x0b\xe7\x78\x47\x91\x53\xb9\x58\x78\xcb\x4b\x78\xac\xb9" +
|
|
"\x6c\x46\xed\x05\xfc\xb6\xf9\x4b\x17\xe8\x45\xed\x5d\x15\x5a\x34\x2f\x31\xff\x12\x0d\x3f\x78\x57\x9d\x2e\x49\x98" +
|
|
"\xcf\x61\x8a\x9e\xc2\x1d\xd3\xd6\xf1\x1f\x5c\xdb\x62\x6c\x5d\xa8\xeb\xc3\xcd\x83\x76\xd3\x4d\x7e\x69\xd0\xcf\xe0" +
|
|
"\x99\xc5\x1c\x89\xa4\x9f\xb5\x03\xbd\xda\xea\xfb\x04\x3f\xc9\xa9\xbc\xec\xd6\x4a\x6d\x9a\xb1\xb6\xf4\x7c\xbd\xdd" +
|
|
"\x36\xf7\x8d\x10\x72\x22\x6f\x92\xb1\x73\x63\x83\xb2\xd6\xd4\x46\x1b\x78\xc2\xe8\x11\x89\x49\x58\xb5\x33\xd1\x4f" +
|
|
"\xfa\xfd\xe4\x78\x41\x3d\xb8\x77\xe2\x18\xce\x6d\x6e\x1a\x85\x20\x8d\x09\xcf\x97\x5a\x1b\x54\x4b\x17\xe0\xd9\x08" +
|
|
"\x8d\xbb\x7e\x7e\x08\xce\x83\x5e\x08\x6a\xab\xf4\x54\xab\x46\x9a\x76\x0d\x13\x48\x02\x8b\xa8\x50\x3d\xe4\xf0\xf7" +
|
|
"\x3e\x46\x26\xdb\x6f\x91\x6d\x97\x53\xd1\x2d\xc4\x54\x74\x0f\xd0\xbf\x03\x00\x00\xff\xff\x68\x98\x69\x6f\x91\x0a" +
|
|
"\x00\x00")
|
|
|
|
func bindataDisplayhtmlBytes() ([]byte, error) {
|
|
return bindataRead(
|
|
_bindataDisplayhtml,
|
|
"display.html",
|
|
)
|
|
}
|
|
|
|
|
|
|
|
func bindataDisplayhtml() (*asset, error) {
|
|
bytes, err := bindataDisplayhtmlBytes()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info := bindataFileInfo{
|
|
name: "display.html",
|
|
size: 2705,
|
|
md5checksum: "",
|
|
mode: os.FileMode(436),
|
|
modTime: time.Unix(1528111037, 0),
|
|
}
|
|
|
|
a := &asset{bytes: bytes, info: info}
|
|
|
|
return a, nil
|
|
}
|
|
|
|
|
|
//
|
|
// Asset loads and returns the asset for the given name.
|
|
// It returns an error if the asset could not be found or
|
|
// could not be loaded.
|
|
//
|
|
func Asset(name string) ([]byte, error) {
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
if f, ok := _bindata[cannonicalName]; ok {
|
|
a, err := f()
|
|
if err != nil {
|
|
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
|
}
|
|
return a.bytes, nil
|
|
}
|
|
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
|
|
}
|
|
|
|
//
|
|
// 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 {
|
|
panic("asset: Asset(" + name + "): " + err.Error())
|
|
}
|
|
|
|
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.
|
|
//
|
|
func AssetInfo(name string) (os.FileInfo, error) {
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
if f, ok := _bindata[cannonicalName]; ok {
|
|
a, err := f()
|
|
if err != nil {
|
|
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
|
|
}
|
|
return a.info, nil
|
|
}
|
|
return nil, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
|
|
}
|
|
|
|
//
|
|
// AssetNames returns the names of the assets.
|
|
// nolint: deadcode
|
|
//
|
|
func AssetNames() []string {
|
|
names := make([]string, 0, len(_bindata))
|
|
for name := range _bindata {
|
|
names = append(names, name)
|
|
}
|
|
return names
|
|
}
|
|
|
|
//
|
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
|
//
|
|
var _bindata = map[string]func() (*asset, error){
|
|
"display.html": bindataDisplayhtml,
|
|
}
|
|
|
|
//
|
|
// 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
|
|
// following hierarchy:
|
|
// data/
|
|
// foo.txt
|
|
// img/
|
|
// a.png
|
|
// b.png
|
|
// then AssetDir("data") would return []string{"foo.txt", "img"}
|
|
// 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 {
|
|
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 bintree struct {
|
|
Func func() (*asset, error)
|
|
Children map[string]*bintree
|
|
}
|
|
|
|
var _bintree = &bintree{Func: nil, Children: map[string]*bintree{
|
|
"display.html": {Func: bindataDisplayhtml, Children: map[string]*bintree{}},
|
|
}}
|
|
|
|
// RestoreAsset restores an asset under the given directory
|
|
func RestoreAsset(dir, name string) error {
|
|
data, err := Asset(name)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
info, err := AssetInfo(name)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
|
|
if err != nil {
|
|
return err
|
|
}
|
|
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
|
}
|
|
|
|
// RestoreAssets restores an asset under the given directory recursively
|
|
func RestoreAssets(dir, name string) error {
|
|
children, err := AssetDir(name)
|
|
// File
|
|
if err != nil {
|
|
return RestoreAsset(dir, name)
|
|
}
|
|
// Dir
|
|
for _, child := range children {
|
|
err = RestoreAssets(dir, filepath.Join(name, child))
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _filePath(dir, name string) string {
|
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
|
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
|
}
|