mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
236 lines
32 KiB
Go
236 lines
32 KiB
Go
|
// Code generated by go-bindata.
|
||
|
// sources:
|
||
|
// pkg/aggregator/data/blacklist.txt
|
||
|
// DO NOT EDIT!
|
||
|
|
||
|
package aggregator
|
||
|
|
||
|
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 os.FileInfo
|
||
|
}
|
||
|
|
||
|
type bindataFileInfo struct {
|
||
|
name string
|
||
|
size int64
|
||
|
mode os.FileMode
|
||
|
modTime time.Time
|
||
|
}
|
||
|
|
||
|
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) IsDir() bool {
|
||
|
return false
|
||
|
}
|
||
|
func (fi bindataFileInfo) Sys() interface{} {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
var _blacklistTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x5b\xfb\x72\xe3\xae\xaf\xff\x3f\xef\x42\xa6\xed\x76\x2f\xdf\xc7\x91\x41\xb6\x55\x2e\x62\xb9\x38\x71\x9e\xfe\x8c\x00\xa7\xe9\xb6\xa7\xbf\x9d\xe9\x2c\xba\x18\x63\x01\xe2\x23\x89\x3c\xfd\xc0\x33\x85\x99\x4f\x4f\x41\x39\x0a\x78\x2e\xdb\xe9\x59\xfd\xf7\x5f\x46\x3e\x6b\xf6\xa7\x67\x35\x27\x44\x95\x57\x48\xa8\xa6\x5a\x0a\x87\xdc\x05\x4f\x4f\x86\x9d\x83\x94\xd5\x5d\xf7\xe9\x29\x23\x24\xbd\x62\x58\x28\xe0\xd0\x7b\xf1\x90\x0b\x26\xde\x06\x59\xfb\xfb\x9e\x23\x78\x7f\x4e\xf5\xf4\x7c\xc1\xa9\xab\x9c\xbd\x3b\xbd\xbc\x5e\x7f\xab\x8c\x69\xc3\xa4\x72\x8d\x91\x53\x39\x67\x2a\x78\x7a\xd9\xb9\xa6\xde\xfc\xa1\x1c\x96\x82\x49\x19\xf6\x40\x21\x9f\x03\x96\xd3\x8f\x0b\xec\x01\xcb\x85\x93\xed\x2f\x7e\xa5\x10\xa4\xff\x57\xca\x85\xf3\xca\xb1\x73\xef\x6f\xcb\x67\x4e\xcb\xe9\xa7\xca\x05\x63\x56\x85\x55\x2e\x90\x8a\x9a\x6a\x96\xb1\xf7\x3e\x7e\xce\x9c\xf0\x2a\xbd\xfc\x5a\x39\x46\x0a\x4b\x63\xff\xb6\x1c\x85\xf9\xdb\x83\x45\xcf\x01\x77\x0e\xcd\x78\x4d\x78\x83\xfe\x2a\x98\xb4\xc1\x79\x3d\x5f\xf7\x5b\x6f\x2f\x47\xd3\x41\x0d\x7a\xc5\xd4\xd5\x34\x98\xfe\x09\xa0\x21\x25\x64\xe9\x19\x74\x0d\x58\xe8\xaa\x12\xce\x98\xd2\xa1\x6a\x20\xd0\x3a\x9a\x1a\xf2\xd1\x9c\xcf\x6e\x3f\x81\xc9\x11\x52\x19\xac\x42\x0b\xa6\x73\xb1\x27\x30\x1b\x86\x52\x13\x46\x48\x56\xb3\x7c\x24\x69\x18\x5a\x1b\x69\x9c\x39\x55\xdf\xe7\x04\xcc\xc6\x16\xca\x31\x50\x4c\x6c\xe8\x06\x14\xba\xf6\x3c\x73\x32\x30\x39\xbc\xe0\x24\xf3\x90\x21\x18\xcf\x13\x39\x84\x18\xf3\xd0\xe1\x04\x6d\xfc\x34\xb1\xa3\x32\xde\x43\x06\x92\xc7\x09\xdd\xd9\xde\x4e\x60\xeb\x1a\xe8\x3c\xed\x27\x70\x33\x4c\x5c\xfa\xcb\x1c\x4d\x98\x4b\x06\xd7\xad\x08\x8e\xf0\xda\x28\xe9\xcd\x51\x80\x09\x02\xa1\xb6\x70\x8e\xee\x04\xce\x42\x98\x21\x79\x68\x93\x08\xce\x61\x5a\x48\xdb\xf1\x68\xa3\xde\xe0\xa0\x6c\xe0\xcb\xf8\x40\xe7\x3c\x24\x8b\x25\x07\xbc\x18\xd8\x1d\x9d\x17\x13\x84\x1d\xf0\x92\xcf\xde\x1c\xcd\x97\xd7\x33\x35\xfe\x85\x3d\x86\xfb\xc3\x97\x44\xcb\x2a\x2b\xb5\x0d\x2a\xae\x6d\x04\x6d\xea\x5c\xc1\xe4\xe9\x7a\xae\x70\x02\x0f\x37\x0e\xb2\x2b\xda\x42\x26\x3d\xbe\xc8\x17\x65\xdb\x83\xbe\xa0\x53\x5b\x42\x83\xb9\xe0\x61\xdd\x00\x4e\x81\x4e\x3c\x41\xc9\xe7\x95\xdd\x19\x73\x63\xee\x85\x74\x56\xb2\x44\x9a\x99\x02\x44\x50\x14\x42\x6e\x3d\x05\x93\x98\x8c\xca\x65\x3f\xcc\x16\xc8\xcb\xc0\xb8\xf0\xf1\x00\x79\x94\xbf\xae\x5f\x48\x27\xb8\x38\x4c\xdd\x6e\xa1\xd0\x52\x61\x82\x34\x55\xd3\xe7\x2d\x16\xb4\xa0\xda\x97\x35\x3a\x61\x30\x60\x37\x48\x85\x52\x9b\x3d\x61\xf0\x26\x13\xd0\xfb\x4f\xd6\xd2\xc6\xae\x14\xea\x86\x48\xc5\xa0\xe5\x61\xb1\x54\x22\x50\x28\xaa\x1b\xbd\x77\x58\x22\xa4\xbf\xf5\xa0\x6a\x74\x62\xd2\x63\x67\x41\xb6\x6a\xaf\xa3\x5d\x1c\x16\xd2\x7d\x2c\x6d\xb8\x65\xb7\xfd\xbb\x6b\x61\xa5\xd9\x47\x87\xd7\xb6\x90\x84\xb6\x04\x6a\xae\xce\x99\x44\x1b\xde\xb5\x1e\x67\xa1\xf5\x51\x0b\x4f\x8e\x17\x21\xda\x64\xd5\xc2\x5f\xe9\x08\xaf\x24\x98\x67\xd2\x7d\x30\xb5\xf0\x46\x06\x79\x4a\xdc\xf6\xde\xd8\x68\x1b\x6d\xa0\x1c\x79\xae\xd7\xc1\xb0\x37\x48\xb2\xac\xd9\x0e\x23\x6c\x85\x29\x14\x4c\xd8\xc7\xbe\x15\xde\x76\x5b\x63\xb3\xe6\x0d\x52\xd1\xae\x4e\xfd\xbd\xb7\xa9\x5a\x10\x7f\xdb\xbb\xba\xc9\xe7\xd5\xdb\x69\x02\xba\x42\x52\xbe\x66\xd2\x90\xd5\x92\xa0\x50\xdf\x6f\x13\x38\x30\xb5\x2d\xc7\x09\x1c\x15\xae\x89\x65\xc8\x78\x48\x3f\x6c\x93\x09\x92\x51\x09\xc1\x89\x54\x3e\x7e\x82\x52\x8b\x9a\x6b\xe8\x1d\x6c\x90\x08\x16\x32\x67\x83\xa7\x09\x41\xaf\x85\x0d\xec\x4d\x86\x26\x31\xfb\xfb\x54\xd5\x7c\x9a\x30\xa1\xc7\xb0\x43\x5e\x6d\xdf\x69\xb2\x7f\x95\x41\x70\x6a\x35\xe6\x1c\x13\x77\x8e\x78\xcd\xc3\xbc\xaa\x66\x38\x4f\xae\x62\x17\x89\x91\x79\x9e\x87\x77\xbb\xb3\x32\xcf\xe5\x02\x09\xdb\x02\x7b\xe0\xba\x5a\x88\xc3\x5d\xb7\xf9\x1e\x2a\x7b\xd6\xcc\xe2\xcf\xfb\x68\x0f\x69\xeb\x77\x35\x66\xda\x4b\x9f\x87\x47\x26\xa2\x79\x67\xde\xdd\xd9\x05\x92\x19\x76\x6d\xe7\xcb\x8a\xe0\xca\x3a\x21\xd4\x72\xf4\x7b\x8b\x49\x5c\x68\x39\x5c\xdb\x44\xb3\x4a\xe3\x44\x9b\x68\x71\x72\xd6\xcc\x47\x87\x43\xc3\x39\x12\xc3\x6b\x07\x39\xf7\xd5\xd4\x6c\x4f\x7c\x6c\x0b\x7b\x3b\x4d\x14\x1d\x04\xd4\x18\x4a\x6a\x8b\x77\xa2\x64\x9e\x7b\xe3\xf0\xc7\x13\xdd\xee\xaf\x72\xa0\xad\x9a\x13\xc9\x17\x2f\xd0\xe9\x15\xe4\xf4\x2b\xfd\x50\x90\x35\xfe\xfc\xf4\xd
|
||
|
|
||
|
func blacklistTxtBytes() ([]byte, error) {
|
||
|
return bindataRead(
|
||
|
_blacklistTxt,
|
||
|
"blacklist.txt",
|
||
|
)
|
||
|
}
|
||
|
|
||
|
func blacklistTxt() (*asset, error) {
|
||
|
bytes, err := blacklistTxtBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "blacklist.txt", size: 16105, mode: os.FileMode(420), modTime: time.Unix(1541751116, 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, 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.
|
||
|
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, fmt.Errorf("AssetInfo %s not found", name)
|
||
|
}
|
||
|
|
||
|
// AssetNames returns the names of the assets.
|
||
|
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){
|
||
|
"blacklist.txt": blacklistTxt,
|
||
|
}
|
||
|
|
||
|
// 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, fmt.Errorf("Asset %s not found", name)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if node.Func != nil {
|
||
|
return nil, fmt.Errorf("Asset %s not found", name)
|
||
|
}
|
||
|
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{nil, map[string]*bintree{
|
||
|
"blacklist.txt": &bintree{blacklistTxt, 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
|
||
|
}
|
||
|
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
|
||
|
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, "/")...)...)
|
||
|
}
|
||
|
|