405 lines
40 KiB
Go
405 lines
40 KiB
Go
![]() |
// Code generated by go-bindata. (@generated) DO NOT EDIT.
|
||
|
|
||
|
//Package translations generated by go-bindata.// sources:
|
||
|
// translations/dicts/de_DE.toml
|
||
|
// translations/dicts/en_US.toml
|
||
|
// translations/dicts/tt_TT.toml
|
||
|
// translations/dicts/zh_CN.toml
|
||
|
package translations
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
"compress/gzip"
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
"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
|
||
|
}
|
||
|
|
||
|
// 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 fi.mode&os.ModeDir != 0
|
||
|
}
|
||
|
|
||
|
// Sys return file is sys mode
|
||
|
func (fi bindataFileInfo) Sys() interface{} {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
|
||
|
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 _dictsDe_deToml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x17\xdb\x6e\x1c\xb7\xf5\x9d\x5f\x71\x4a\x20\x8d\x0d\x48\x1b\xb9\x46\x1f\x32\xf6\x08\xa8\x65\xd9\x11\x2a\xb9\x8a\x56\x5b\x03\xf5\xea\x81\x3b\x3c\x33\xc3\x2c\x87\x9c\xf0\xb2\xeb\xad\xed\x7f\x2f\x0e\xc9\xbd\xc8\x96\x9a\xc0\x4f\x43\x9e\xfb\xfd\x70\x1a\x6b\x5a\xd5\xb5\x4a\x63\xcd\xcf\xd2\x19\xe8\xc2\x59\xf4\xa2\xc3\x9a\xcf\xe8\x53\xc1\xa7\x93\x2f\xf0\xc1\x8e\x41\x59\xe3\xef\xe6\x66\x6e\xfe\x95\xcf\xd5\xdc\x70\x16\x6c\x10\xba\xe6\xb7\xf4\xe1\x8c\xb1\x0f\x3d\xea\xf1\x8e\x8d\x22\xf4\xbe\xe6\x97\x56\x48\xb1\xd0\x08\x8d\xd5\xd6\xf9\xa6\xc7\x01\x3d\xfc\x15\xb4\xd8\xd8\x18\xfc\x11\x08\x23\x21\xf4\x84\xdf\xa9\x3f\x02\xe1\x10\x3c\x0a\xd7\xf4\x28\xa1\xb5\xee\x08\x94\x01\xeb\x24\xba\x8a\x33\x6d\xbb\x9a\xdf\xf6\x08\xda\x66\x7a\x50\x9e\xf0\x9f\x4e\xbe\x70\xb6\x76\x2a\x04\x34\x3b\x77\xca\x1d\x82\xcd\x78\xc6\x3e\x08\xd7\xf9\x3b\x46\x56\xd6\xfc\x17\xa5\x5b\x0c\xf8\x31\x80\x30\xff\x45\xd5\xa1\x99\x70\x96\x4c\xad\xf9\xb9\x32\xf0\x46\xb8\x45\x32\x5a\x40\x8b\x3e\xf8\x80\x5a\x27\x1a\xdf\x08\x0a\xda\x34\x03\x40\xa2\x81\xe9\x52\x68\x85\x2e\x9a\xce\xb7\x62\x19\xac\x03\x54\xe6\x08\x4e\x4f\x38\x5b\xa1\xf3\xca\x9a\x9a\xff\x27\xe9\x00\xa9\x10\xfe\x9d\x61\x20\xa2\x87\x68\x24\x2c\x10\x8d\x4c\xb2\x47\x74\xcd\x18\x6b\x3e\xed\xed\x1a\x50\x34\x3d\x9c\x5d\xcf\xc8\x43\x8a\x13\x1d\xd7\x4a\x76\x18\xc8\xd2\x31\x8a\x55\x57\x28\xc5\x0a\x9d\xe8\xf0\x51\xe2\x80\xc3\x58\x48\xe9\x88\x4e\x84\xe8\x30\x85\xae\x15\xbd\x43\xd3\xa3\x0a\x93\x3f\xc2\x73\xe6\x83\x08\xd1\x2f\x84\xdb\xea\x85\x1d\x04\xd6\x2a\xf4\x49\x73\x50\x03\x4e\x38\x73\x22\x60\xcd\x6f\xb0\x75\xe8\x7b\x68\x1d\xfe\x1e\xd1\x34\x9b\x09\x5c\x59\x1f\x12\x11\x44\xa3\x82\x07\xd1\x34\x38\x06\x94\x13\x80\x39\x7f\x36\xcc\x39\xd4\xe0\x0a\x1b\xae\xd0\x6d\x60\x50\x26\x06\xcc\xf8\x93\x93\xc1\x3f\x40\x92\xe0\x13\xce\x72\x71\xd5\xfc\x9d\x18\x10\x6c\x5b\x8a\x0d\xfc\x88\x4d\x2e\x98\xd6\xba\x64\xe5\xec\x62\x02\x33\x8f\x30\xe7\xc7\x73\x4e\x35\x32\xaa\x91\xcc\x36\x18\x6a\x3e\x45\x8d\x4d\x00\x83\x61\x6d\xdd\x12\x94\x09\xe8\x5a\xd1\xe0\x04\xa6\xa4\x4e\xe8\x3d\xc8\x43\x23\x0c\x2c\x10\x24\xb6\xca\xa0\x84\xe8\x95\xe9\xa0\xb1\xc3\x20\xc0\xe3\x28\x28\x0e\x12\x56\x42\x47\xf4\x13\xb8\xb8\xcf\x27\xb4\xb7\xc4\xac\x3a\x63\xdd\x8e\x79\xce\xff\x32\xe7\x9c\xe1\xc7\xd1\xba\x50\xf3\x73\x93\xda\x68\xc0\xe0\x54\xe3\x93\x07\x19\x05\x36\xe7\x9a\xbc\x53\xad\x42\x09\x04\x9d\x70\x36\x2c\x46\x5f\x52\xb4\xf5\x81\xcc\x00\xe1\x81\x50\xa9\x22\x7c\xa8\xf9\x4d\x34\x1e\xe8\xe8\x53\x33\xe2\x47\xca\x47\x4a\xa4\x8f\x4d\x83\xde\xff\xd4\x0a\xa5\xa3\xa3\x1e\x95\x98\xfa\xc3\xb4\xdf\xcc\x0c\x8a\x5e\xf4\x08\xca\xf8\x80\x42\x52\xd8\x25\xb6\x22\xea\x00\x4f\xae\x66\xd3\x5b\x78\x75\x0e\x6f\x2e\x6e\xa6\xb7\xf0\x8f\x9b\xb7\xb3\xab\xf3\x77\xb7\x4f\x39\xd3\x8a\x0c\xe0\x9c\x5d\x2a\x1f\xe0\xa5\xc4\x95\x6a\xd0\x7f\x2e\xc3\xe1\xf3\xe1\xcc\xf8\x9c\x06\xca\xe7\x25\x6e\xfc\x29\x03\x80\x42\x5b\xc1\xb5\x53\x26\x78\xa0\x04\x67\x18\x18\x41\x33\x86\x22\xd4\x2a\x1d\xd0\xa5\xc0\xe5\x36\xf0\xc4\x5a\xc4\x57\x40\x5a\x3d\x2c\xa2\xd2\xf2\x58\x99\x2d\x9c\x48\x0e\x35\x1f\xd2\x05\xa2\x3b\x44\x12\x71\xb2\x2c\x53\x25\x33\xf2\x28\x8b\x4e\xd0\x90\xcc\xc1\xc9\xc3\x2c\x53\x12\x4b\xb1\xa6\x82\xf7\xf9\x00\xa1\x17\x61\x5b\x44\xd1\xa3\xa4\xae\x13\xc5\x22\x62\x20\xbf\x2b\xc8\xcd\xd9\x23\x5d\x17\x56\x38\x09\x0b\x65\xa4\x32\x9d\x9f\x50\x14\x69\xd8\x61\xcd\xdf\xd3\x27\x59\x22\x76\x39\x38\x18\xaf\x93\x34\x05\xd1\x39\xeb\xee\x58\x86\x8f\xc2\x79\xac\x39\xe5\x19\x65\xea\x03\x02\x1c\x32\x55\x79\x7c\x36\x5a\x15\x5a\xfa\x50\x99\x9e\x5d\x5e\x00\x4d\xd4\x42\xa0\x6d\xe7\x31\xc4\xf1\x50\x58\x02\xec\xa6\x75\x21\x8c\x66\x69\xec\xda\xd8\x31\xd4\x7c\x96\xcf\x90\x57\x0c\xcc\xf9\xa7\x93\x2f\x73\xfe\x02\x82\xdb\xec\x17\xc5\x61\xd4\x8f\x52\x3c\x8e\x72\x3c\x8f\xc0\xba\x6d\x39\xd0\x42\x4a\x51\x20\xed\x35\x7f\xb3\xb3\x21\x01\x1f\xc8\xcc\xd6\xaf\x1e\x9b\x65\x5a\x2c\x29\x2e\x1e\xd0\x34\x36\x52\x9b\xa2\x7c\x01\xad\xb3\x03\xd1\x55\x9c\x95\xfe\xcb\x2e\x26\x5a\x72\x2f\x50\x24\xe2\x98\x16\x65\xa1\xa8\xe0\xd3\xb3\x2f\x9c\x19\x5b\xee\x35\x37\xf6\x5e\xf7\x12\x6d\xd2\xdd\x8a\x20\x68\x0b\x35\x3d\x05\x2d\x08\x0d\x59\x6e\x02\x91\x60\xa2\x54\xa6\xb5\x45\xa4\xc3\xc6\xae\x0a\x7d\
|
||
|
|
||
|
func dictsDe_deTomlBytes() ([]byte, error) {
|
||
|
return bindataRead(
|
||
|
_dictsDe_deToml,
|
||
|
"dicts/de_DE.toml",
|
||
|
)
|
||
|
}
|
||
|
|
||
|
func dictsDe_deToml() (*asset, error) {
|
||
|
bytes, err := dictsDe_deTomlBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "dicts/de_DE.toml", size: 4346, mode: os.FileMode(420), modTime: time.Unix(1592527807, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _dictsEn_usToml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x17\x4d\x4f\x1c\x39\xf6\xee\x5f\xf1\xd6\xd2\xec\x10\x09\x7a\xc8\x46\x7b\x98\x0a\xd5\xd2\x86\x90\x2c\x5a\xc8\x32\x40\x2b\x87\x34\x07\xb7\xfd\xaa\xca\x83\xcb\xae\xb1\x5d\xdd\x69\x91\xfc\xf7\xd5\xb3\xdd\x1f\x24\xb0\x33\xca\xa9\xec\xf7\xfd\xfd\x5c\xd2\xd9\x46\xb7\x8d\x36\x58\xf3\xd3\x74\x06\xba\x70\x36\x06\xd1\x62\xcd\x67\xf4\xa9\xe0\xe1\xf8\x2b\x7c\x72\x43\xd4\xce\x86\xbb\xb9\x9d\xdb\xff\xe6\x73\x35\xb7\x9c\x45\x17\x85\xa9\xf9\x2d\x7d\x38\x63\xec\x53\x87\x66\xb8\x63\x83\x88\x5d\xa8\xf9\x85\x13\x4a\x2c\x0c\x82\x74\xc6\xf9\x20\x3b\xec\x31\xc0\xdf\xc1\x88\xb5\x1b\x63\x38\x04\x61\x15\xc4\x8e\xf0\x5b\xf5\x87\x20\x3c\x42\x40\xe1\x65\x87\x0a\x1a\xe7\x0f\x41\x5b\x70\x5e\xa1\xaf\x38\x33\xae\xad\xf9\x6d\x87\x60\x5c\xa6\x07\x1d\x08\xff\x70\xfc\x95\xb3\x95\xd7\x31\xa2\xdd\xba\x53\xee\x10\x5d\xc6\x33\xf6\x49\xf8\x36\xdc\x31\xb2\xb2\xe6\x37\x9d\x5b\x41\xec\x74\x80\x20\x3d\xa2\x9d\x70\x96\x0c\xad\xf9\x0d\x46\x10\xfb\x56\x4f\x38\x0b\x52\x50\xa4\xde\x7b\x31\x74\x90\x2e\xd0\x08\x19\xc9\xbe\xe9\x31\x67\x4b\xf4\x41\x3b\x5b\xf3\x2b\xaf\x6d\x84\x72\x4d\x1e\xe2\x67\x1d\x27\x9c\x0d\xe8\xe5\x30\x16\xb5\x28\x64\x07\xa7\x57\x33\xb2\x9d\x22\x40\xc7\x95\x56\x2d\x12\xa5\x1c\x46\xb1\x6c\x0b\xa5\x58\xa2\x17\x2d\x3e\x4b\x1c\xb1\xdf\xfa\x82\xfd\x80\x5e\xc4\xd1\x63\x0a\x4a\x23\x3a\x8f\xb6\x43\x1d\x27\x7f\x86\xe7\x2c\x44\x11\xc7\xb0\x10\x7e\xa3\x17\xb6\x10\x58\xe9\xd8\x25\xcd\x51\xa7\x58\x78\x11\xb1\xe6\xd7\xd8\x78\x0c\x1d\x34\x1e\xff\x18\xd1\xca\xf5\x04\x2e\x5d\x88\x89\x08\x46\xab\x63\x00\x21\x25\x0e\x11\xd5\x04\x60\xce\x5f\xf6\x73\x0e\x35\xf8\xc2\x86\x4b\xf4\x6b\xe8\xb5\x1d\x23\x66\xfc\xf1\x71\x1f\x9e\x20\x49\xf0\x09\x67\xb9\x6c\x6a\xfe\x41\xf4\x08\xae\x29\x65\x04\x61\x40\x99\x4b\xa1\x71\x3e\x59\x39\x3b\x9f\xc0\x2c\x20\xcc\xf9\xd1\x9c\x53\xf6\x07\x3d\x90\xd9\x16\x23\xe5\xd6\xa0\x8c\x60\x31\xae\x9c\xbf\x07\x6d\x23\xfa\x46\x48\x9c\xc0\x0d\xa9\x13\x66\x07\x0a\x20\x85\x85\x05\x82\xc2\x46\x5b\x54\x30\x06\x6d\x5b\x90\xae\xef\x05\x04\x1c\x04\xc5\x41\xc1\x52\x98\x11\xc3\x04\xce\x1f\xf3\x09\x13\x1c\x31\xeb\xd6\x3a\xbf\x65\x9e\xf3\xbf\xcd\x39\x67\xf8\x79\x70\x3e\xd6\xfc\xcc\xa6\x06\xe9\x31\x7a\x2d\x43\xf2\x20\xa3\xc0\xe5\x5c\x93\x77\xba\xd1\xa8\x80\xa0\x13\xce\xfa\xc5\x10\x4a\x8a\x36\x3e\x90\x19\x20\x02\x10\x2a\x55\x44\x88\x35\xbf\x1e\x6d\x00\x3a\x86\x6d\x11\x86\x9c\xc8\x30\x4a\x89\x21\xfc\xd2\x08\x6d\x46\x4f\xdd\xa7\x30\xd5\xbe\x6d\xbe\x9b\x06\x14\xbd\x31\x20\x68\x1b\x22\x0a\x45\x61\x57\xd8\x88\xd1\x44\x38\xb8\x9c\xdd\xdc\xc2\x9b\x33\x78\x77\x7e\x7d\x73\x0b\xff\xba\x7e\x3f\xbb\x3c\xfb\x70\xfb\x82\x33\xa3\xc9\x00\xce\xd9\x85\x0e\x11\x4e\x14\x2e\xb5\xc4\xf0\xa5\xb4\xfd\x97\xfd\x69\xf0\x25\x8d\x8a\x2f\xf7\xb8\x0e\x53\x06\x00\x85\xb6\x82\xd4\x46\x01\x28\xc1\x19\x06\x56\xd0\xf4\xa0\x08\x35\xda\x44\xf4\x29\x70\xb9\x0d\x02\xb1\x16\xf1\x15\x90\xd6\x00\x8b\x51\x1b\x75\xa4\xed\x06\x4e\x24\xfb\x9a\xf7\xe9\x22\xd1\xed\x23\x89\x38\x59\x96\xa9\x92\x19\x79\x48\x8d\x5e\xd0\xf8\xcb\xc1\xc9\x63\x2a\x53\x12\x4b\xb1\xa6\x82\x8f\xf9\x00\xb1\x13\x71\x53\x44\x63\x40\x45\x5d\x27\x8a\x45\xc4\x40\x7e\x57\x50\x06\x11\xd2\x75\xe1\x84\x57\xb0\xd0\x56\x69\xdb\x86\x09\x45\x91\xc6\x18\xd6\xfc\x23\x7d\x92\x25\x62\x9b\x83\xbd\xc1\x39\x49\xf3\x0d\xbd\x77\xfe\x8e\x65\xf8\x20\x7c\xc0\x9a\x53\x9e\x51\xa5\x3e\x20\xc0\x3e\x53\x95\x07\xa3\x34\xba\xd0\xd2\x87\xca\xf4\xf4\xe2\x1c\x68\x56\x16\x02\xe3\xda\x80\x71\x1c\xf6\x85\x25\xc0\x76\x0e\x17\xc2\xd1\xde\x5b\xb7\xb2\x6e\x88\x35\x9f\xe5\x33\xe4\xe5\x01\x73\xfe\x70\xfc\x75\xce\x5f\x43\xf4\xeb\xdd\x0a\xd8\x8f\xfa\x61\x8a\xc7\x61\x8e\xe7\x21\x38\xbf\x29\x07\x5a\x35\x29\x0a\xa4\xbd\xe6\xef\xb6\x36\x24\xe0\x13\x99\xd9\xf8\xd5\xa1\xbc\x4f\x2b\x23\xc5\x25\x00\x5a\xe9\x46\x6a\x53\x54\xaf\xa1\xf1\xae\x27\xba\x8a\xb3\xd2\x7f\xd9\xc5\x44\x4b\xee\x45\x8a\xc4\x38\xa4\x15\x58\x28\x2a\x78\x78\xf9\x95\x33\xeb\xca\xbd\xe6\xd6\x3d\xea\x5e\xa2\x4d\xba\x1b\x11\x85\x69\x30\xca\x8e\x82\x16\x85\x81\x2c\x37\x81\x48\x30\x51\x6a\xdb\xb8\x22\xd2\xa3\x74\xcb\x42\x9f\xce\xa5\xc2\x9f\xe1\x7a\x0d\xe1\x5e\x0f\x43\x01\x15\x7f\xad\x53\xb8\x6c\xdc\x68\x55\xb2\x6b\x0c\x49\x02\xb1\x24\x20\x67\xc9\x43\xf4\xfe\x69\x27\x8b\
|
||
|
|
||
|
func dictsEn_usTomlBytes() ([]byte, error) {
|
||
|
return bindataRead(
|
||
|
_dictsEn_usToml,
|
||
|
"dicts/en_US.toml",
|
||
|
)
|
||
|
}
|
||
|
|
||
|
func dictsEn_usToml() (*asset, error) {
|
||
|
bytes, err := dictsEn_usTomlBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "dicts/en_US.toml", size: 4308, mode: os.FileMode(420), modTime: time.Unix(1592527521, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _dictsTt_ttToml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x57\x4d\x6f\xdc\x38\xd2\xbe\xf3\x57\xd4\x4b\x60\xde\xc9\x00\x4e\x4f\xb2\xc1\x1e\x46\x89\x0c\x6c\x1c\x3b\x6b\xac\x9d\xf5\xd8\x6e\xe4\x90\xf6\x81\x4d\x95\x24\x4e\x53\x24\x87\x2c\xa9\xd3\x48\xf2\xdf\x17\x45\x49\xed\x76\xe2\x60\x82\xb9\xa9\x59\xdf\x5f\x4f\x55\x6b\xef\x6a\xd3\xd4\xc6\x62\x29\x4f\xce\xde\xc2\xd9\xc5\xa9\x14\x7d\x52\x0d\x96\x12\x1b\x95\x96\x05\x7c\x7a\xf6\x05\x3e\x24\xe7\x0d\x05\x7f\xb7\x72\x2b\x37\x7e\xff\xb7\x58\x39\x29\xc8\x93\xb2\xa5\xb4\x8a\xfc\xad\x14\x42\x7c\x68\xd1\x86\x3b\x11\x14\xb5\xa9\x94\x11\xab\xe8\xc1\x19\x38\x8a\xbe\x86\x0a\x5b\x1d\x15\x26\xc0\xa8\xe0\x08\xad\xa9\xa1\x31\xb5\xf3\x1a\xb0\x25\xa8\x9c\x82\xa3\x44\xbd\xdf\x29\x0b\xff\x0f\x09\x3b\x6c\x75\x8a\xde\x32\xdd\xae\x55\xa5\xfc\x45\x21\x85\xf5\x4d\x29\x9d\x81\x64\x60\xd4\xe0\x2d\x60\x7b\xcb\x5e\x4a\xb1\x8d\x86\x08\x5d\x29\x3d\x81\x43\x22\x13\xb7\xa3\x89\x93\x91\x2e\xc4\x07\x15\x9b\x74\x27\xd8\xcb\x52\x2e\x1c\x62\xd4\x09\x92\x69\x09\xb6\xbe\xbd\x91\x42\x7b\xeb\x63\x29\x17\x87\xd6\x15\x10\xde\x48\x91\xb4\xe2\x2c\x3d\x3b\xe6\x68\x48\xab\x1a\xd0\x2a\x9d\xa0\x0d\x2a\xbe\x95\x62\xc0\x98\x8c\x77\xa5\x5c\x90\xf9\x88\x39\x1c\xe7\x4d\x8a\x38\x00\x39\x13\xaf\xa4\x08\x18\x75\xe8\x99\x01\x9b\xca\x6c\x61\x79\x75\x92\x23\x77\x26\x7f\xb6\x5a\xe1\xec\x45\xe8\xd5\xd0\x7c\x97\x13\x1b\x15\x71\x50\x13\x33\x61\x17\xb2\x55\x6c\x1d\xc6\x56\xd5\xcc\x96\x30\xf6\xa4\x22\x86\x0e\xc7\xd0\xfe\x8a\x2e\x45\x22\x45\x7d\x5a\xab\x31\x7c\x43\xd9\x62\x4b\x66\x0b\x51\xad\x53\x4f\x8a\x12\xcc\x36\xa3\x22\x2c\xe5\x22\x75\xcf\x9e\x3d\x87\x5d\xc4\x01\xa1\x4d\x18\x6b\x8c\x50\xc2\x4a\xe6\xf7\x95\x04\x58\x20\xf5\xce\x74\x8f\xb0\x74\x23\xbd\x42\x0a\xa8\xb5\x82\x44\xc6\xf5\x90\xed\x52\xf2\x97\xb0\xd8\x69\x87\xfd\x9f\x18\xeb\x49\xec\x5a\x0a\xab\x76\xbe\xa7\x52\xbe\x53\x1d\x82\xaf\x61\xfc\x0d\x29\xa0\x06\x6e\x61\xa8\x7d\x04\x6a\x11\x96\xe7\x0b\x58\x26\x84\x95\x7c\xba\x92\x40\x1e\x82\x09\xb8\x90\xc2\x21\x95\xb2\x71\x26\xf5\x50\x61\xf4\xae\x31\x80\x6b\xf0\xc9\x2a\x70\x4a\x43\x42\xad\xea\x88\xe4\xce\x61\x91\xb0\xb7\x6a\x80\x0a\x49\x45\x15\x30\x81\xea\x3a\xaf\x61\x16\x76\xa6\xc6\x8a\x85\x1f\xc8\x19\xb0\x5c\x19\xbc\x81\xc5\xfd\xd3\x26\xfa\x2d\xa1\x03\xd2\x68\xf1\x06\x56\xf2\xff\x56\x52\x0a\xfc\x18\x7c\x24\xae\x5b\xf4\x01\x2a\x34\xb5\xd1\x18\xd2\x58\x66\x0f\xfc\xfa\x11\x81\xc7\x26\x69\x13\x09\xbb\x3c\x04\xee\x54\x8a\x6e\x1d\x12\xe7\x3e\xac\x3b\x48\x0a\xd8\xc1\xbd\x8d\xb9\x23\x12\x6b\xc6\x8a\x47\x27\xf6\xd6\xa8\xfa\xd7\x94\x50\xeb\x3e\x8d\x05\x4d\xfb\x16\x4d\x94\x90\x20\xb9\xfe\x9a\x7b\xdf\xd5\x23\x12\xfc\x72\xfb\xee\xf4\x72\xf9\xf6\xfa\x5f\x70\x7b\x73\x7d\x7e\x06\xa7\xaf\xe1\xf6\x66\x79\xf9\x04\xc8\xf6\x8a\x03\xaf\x3d\x54\x0a\x29\x39\x03\x98\x7a\xf0\x04\xf7\xe3\x7c\x22\x85\x35\xec\x80\x94\xe2\x38\xed\x70\xf3\x39\xb5\xa4\xc2\xe7\xc3\x89\xfe\x3c\x0d\xfa\xe7\x84\xda\x0c\x58\xbd\x02\x4a\xe6\x42\xa4\xa9\xdf\x39\xd4\x88\xc4\x2a\x73\x06\xb0\x53\x0e\x46\x4e\xa0\xde\x43\xca\x13\x05\xc5\x24\x0d\x00\x62\x46\x0e\x67\x9e\x56\xd6\xf4\x6b\x8e\xcc\x5c\x40\x31\xbf\x33\xcb\xe1\x50\x3b\xf3\x94\x1e\xf0\x1d\x12\x99\x99\x7d\x86\x19\xb0\xd8\x13\x46\x3d\x15\xfb\x09\xb2\xd8\x8d\x49\x32\x73\x02\x88\xc9\x92\xe2\xf9\xaa\x38\x2d\x53\x7b\x90\x6a\x09\xc6\xd0\xde\xb3\x43\x63\x8c\x00\x62\x91\x1a\x67\x2a\x67\xd6\x50\x45\xe5\xd7\x3b\xdc\xe4\xf2\x73\x11\xa1\xe0\xcc\x01\x00\x67\x91\x61\x8d\xc7\xed\x10\x32\xe7\x4a\xa8\xec\x09\x92\x89\xef\x33\xbe\x61\x8c\x3e\xde\x89\x11\xd7\x83\x8a\x89\x81\xfc\x10\x6a\x53\x54\x81\x0b\x56\x21\xf7\x45\x31\x02\xa3\xb6\x66\xe2\x4d\x4d\x54\x70\x7e\x71\x92\x3b\x3d\xaa\x30\x31\x58\xdf\x24\xa4\x3e\xcc\xca\xbc\x85\xd0\x13\xa6\x6f\x34\xf5\x6e\xe3\xfc\xd6\xf9\x40\xa5\x1c\x77\x06\xb8\xad\x77\x1b\xb7\x84\x95\xfc\xf4\xec\xcb\x4a\xbe\x84\xb9\x6c\xd1\xc3\xd1\x98\xbd\xa3\x1c\xed\xd1\x83\x22\xec\x97\xc1\x2e\x12\xaf\x9a\x9c\x85\x5a\x19\x3b\xf9\xf0\xb0\x1e\x98\xc1\x7e\xf6\xe6\x6c\x8e\xab\x45\xbd\xc9\x2b\xa3\xf3\xb1\x86\x97\x15\xf2\x4c\xf6\x5e\x3b\x84\x14\x7d\x8c\xc8\x7c\x85\x14\x1d\x52\x34\x7a\x0a\x31\xf4\x1c\x3d\x71\x78\x7b\x9e\x79\x0c\x0b\xf8\xf4\xfc\x8b\x14\xce\x4f\x12\xa5\x3c\x9c\x51\xef\x32\x6f\xb6\x5d\x2b\x52\xb6\x46\xd2\x6d\xc6\x9c\x56\x13\
|
||
|
|
||
|
func dictsTt_ttTomlBytes() ([]byte, error) {
|
||
|
return bindataRead(
|
||
|
_dictsTt_ttToml,
|
||
|
"dicts/tt_TT.toml",
|
||
|
)
|
||
|
}
|
||
|
|
||
|
func dictsTt_ttToml() (*asset, error) {
|
||
|
bytes, err := dictsTt_ttTomlBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "dicts/tt_TT.toml", size: 4304, mode: os.FileMode(420), modTime: time.Unix(1592527628, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _dictsZh_cnToml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x57\xdd\x73\xd4\x46\x12\x7f\xd7\x5f\xd1\x37\x57\xa9\x90\x2a\xec\x98\x4b\xdd\x43\x14\xcb\x0f\x31\x26\xe7\x3b\xc8\x39\xd8\xae\x3c\x60\x3f\x68\xa5\xde\x5d\xc5\x92\x46\xa7\x19\xed\xc6\x05\x54\x2d\x3e\x8c\x6d\xb0\xbd\x40\xcc\xc7\x19\x2e\xe0\x04\x1f\x1f\xe1\x30\xf9\x38\xb3\xfe\xc2\x7f\x0c\x2b\xad\xf7\x89\x7f\xe1\xaa\x47\xda\xf5\x9a\x98\x4a\x8a\x27\xcd\x74\xff\xba\xa7\xbf\xa6\x7b\x64\x71\x3f\xef\x14\xf2\x8e\x8b\x06\x6b\x4e\x2f\x34\x76\x9e\x25\x37\x67\xea\x5b\xeb\x4c\x8b\x84\x59\x40\x83\xd5\x77\x76\x1b\x4b\x8f\x92\x9b\x1b\xc9\xcf\x37\x74\x38\xdb\x73\x1e\xce\x34\x2b\x73\xcd\x95\x8d\xf1\x31\x7f\xcc\x4f\x97\xfa\x98\xcf\x34\xc9\xa5\xe9\x1a\x6c\x84\x3e\x4c\xd3\xb4\x33\x45\x74\x83\x71\x2d\x30\x65\x51\x18\x2c\x99\x9f\x6b\xae\x6c\xc6\x9b\xd5\xfa\xd6\x62\x7d\x6b\xb5\x5e\xbb\x52\xdf\xa1\xd3\xea\xdb\xb7\xe3\xe9\xd9\xbd\xb5\xad\xb8\x7a\xb3\x39\xbd\xb0\x37\xf7\x13\x1d\xb5\x32\xfb\xaa\x72\x21\xae\xfd\x33\xfe\xb1\x92\x6e\xe3\xeb\xf3\x9d\xd6\xe9\x4c\x73\x79\xc1\x60\xc9\xad\xd5\x78\xf7\x56\x4a\xab\xef\x2c\xd4\x37\x17\xc9\x42\xa6\x95\x43\x47\x4a\xf4\x0f\xba\x14\xbf\xf8\x29\xbe\xf4\xaf\x78\x7a\x35\xc5\x68\xda\x19\x33\x2c\x88\x71\x8d\xec\x34\x58\x72\xfb\x65\xe3\xc1\x66\xbc\xf3\x4d\x3c\xb7\x10\x5f\x9a\x8e\x9f\x6d\xbc\xaa\x4c\x31\xcd\xe2\x2e\x0f\x0d\x16\xcf\xae\xc7\xcf\x96\x0f\x1a\x38\xc5\x34\x61\x99\x14\xb8\xf8\xce\xcb\x78\xe7\xbb\xc6\xf6\xe3\x64\xe9\x65\xb2\xb6\x54\x7f\x79\xe5\xf5\xf6\x7c\x5f\x0f\xd3\x4a\x18\x0a\x87\xfb\x2d\xed\x8d\xb9\xd9\xe4\xee\xd3\x78\x63\xbd\x59\xa9\xc4\x33\x9b\x4a\x45\x80\xa1\x15\x44\x06\x8b\xef\x3e\x82\xfe\xa1\x51\x68\x6c\x5d\x24\x67\x6a\xff\x4d\x45\x92\xb5\x6a\xbd\xf6\x84\x38\xa9\x39\x41\x64\x96\x0a\x87\xa0\xe3\x8d\x9f\xe3\x7f\xcf\xb4\x71\x12\xbd\x7d\x9f\x16\x16\x93\xe7\xd5\xa4\xf6\x38\xde\xfc\x4f\x6a\xb5\x34\x65\x24\x72\x66\xd8\x42\x24\xb7\xd6\x9b\xb7\x7e\x69\x5c\x5e\x4f\x2a\x17\x92\xfb\x55\x05\x0a\x4d\x49\x9e\xcd\xbe\x48\x6e\x3e\x6f\x7e\x77\xad\xb1\x38\xf3\xaa\x32\x15\xd7\x6a\x7b\x0f\x2f\x34\x96\x2f\xa6\x12\xf1\xc2\x0d\xca\xe2\xf2\xa5\xb8\xba\xd6\x58\x7a\xf4\xaa\x32\x35\xc6\x8e\x79\x63\x0c\x0c\x48\xd6\xaa\xf1\xec\xa5\xe6\xf5\x7b\xa9\x86\x94\xd5\xd3\xe3\x89\x16\xf7\x58\x4f\x4f\xb2\xf6\x43\xe3\xe1\xf5\x36\x80\x69\xae\x39\xc9\x23\x69\xb0\x2c\xf3\xd5\xea\xde\xee\xf3\x2c\x77\x57\x17\x5e\x55\xa6\xd2\x5a\x84\x31\xd6\x35\xc6\x60\x6f\xf7\xdb\x64\x71\x55\xc9\xf9\x28\x0d\xd6\xac\xcc\x25\x57\x1e\x37\x76\xae\xc5\x0b\x2b\x64\xea\x83\xe5\x7a\xed\x49\xba\x6d\x2c\x3d\x6a\x56\x6e\xc5\xd5\x17\x64\xd2\xf2\x52\xa7\xa6\x3f\x8c\x31\x88\x77\x77\x1a\x37\x56\x93\xf9\x99\xf8\xd9\x72\x5b\x9e\x69\xf8\x75\xc0\x43\xa9\x62\x9d\xf1\x7e\x58\x8b\xab\xdf\xd7\x6b\x97\xe3\xab\xe4\x6e\x32\x3f\x93\xdc\x9f\xd9\x7b\xf9\x4d\x2b\x95\x5e\x2e\x10\xed\x54\xef\x5c\x6b\x56\xee\xd5\x6b\x9b\x40\xd4\x6e\xca\x88\x90\x06\x4b\xe6\x1e\xee\xad\xcc\x27\xff\xbb\xb2\xb7\x76\x23\xde\x58\xdf\xdb\x5d\x8a\xef\x7c\x9b\xcc\x5e\x8d\x2f\xdf\x4b\x66\x6f\xc6\x0f\x7e\xdc\xfb\x65\xb5\x71\xff\x42\x56\x7a\x7e\x3e\xbd\x98\x8d\xa5\x47\xf5\xcd\xc5\xe4\xce\x6e\x7d\xeb\xfb\xc6\xf6\x66\xe3\xee\x85\xb8\x3a\x95\xdc\x78\xde\x58\xbe\xd8\x59\xe0\xaf\xb7\x67\xe3\xdd\xe9\xe6\xca\x56\x72\x7b\xad\xf1\xf4\x69\xbd\x56\xa9\xd7\x9e\xa4\xc8\xd7\xdb\x73\x4c\x73\x1d\x32\x81\x31\xed\xa4\x23\x24\xf4\xda\x58\x72\x2c\x14\xe7\xd2\xa8\x8b\x73\xaa\xd4\x85\x55\x44\x0f\xc5\x39\x75\x6d\xcf\x4d\xe0\xa4\xe8\xd3\x00\x20\xc3\xea\x30\x14\x3a\xbe\x14\xc0\x23\x99\xd1\xc0\x37\x3d\x14\x90\xe7\x21\xe4\x1d\x57\x62\x68\xe6\x5c\x84\xb2\x63\x17\x50\x0a\x12\xcd\xd4\xeb\x40\xa7\x0a\xc8\x45\x8e\x6b\x77\x39\x7e\x8b\x4e\x90\xce\x93\x3b\x71\x92\x70\x9d\x4c\x02\x2b\xcb\x52\x94\x32\x23\xed\x60\x51\x68\x4a\x87\xfb\x64\x03\x82\x40\x33\xb4\x8a\x29\x92\x44\x32\x6b\x74\xf8\x32\x5d\x80\x2c\x9a\x12\x2c\xd3\x87\x1c\x42\x24\xd0\x06\xc7\x07\x33\xb3\x88\x04\xc8\x6f\x1d\x86\x8b\xbc\x0c\xb2\x88\xb4\xcd\x71\x33\xb4\x21\xe7\xf8\xb6\xe3\x17\x44\x37\x45\x91\x9a\x0c\x1a\xec\x4b\xfa\x28\x4b\x4c\xb0\x31\x6f\x46\x6e\xcb\x26\x65\x4c\xb7\xea\x34\x18\x86\x3c\x1c\xd7\x52\x7a\x60\x86\x02\x0d\x96\x37\x1d\x17\x6d\x90\x1c\x14\xa1\x53\x48\x4f\x5b\x94\xe5\x3a\x19\x96\x3e\x8e\x5f\x80\xfe\x93\x83\x40\x5d\
|
||
|
|
||
|
func dictsZh_cnTomlBytes() ([]byte, error) {
|
||
|
return bindataRead(
|
||
|
_dictsZh_cnToml,
|
||
|
"dicts/zh_CN.toml",
|
||
|
)
|
||
|
}
|
||
|
|
||
|
func dictsZh_cnToml() (*asset, error) {
|
||
|
bytes, err := dictsZh_cnTomlBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "dicts/zh_CN.toml", size: 4232, mode: os.FileMode(420), modTime: time.Unix(1592528537, 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){
|
||
|
"dicts/de_DE.toml": dictsDe_deToml,
|
||
|
"dicts/en_US.toml": dictsEn_usToml,
|
||
|
"dicts/tt_TT.toml": dictsTt_ttToml,
|
||
|
"dicts/zh_CN.toml": dictsZh_cnToml,
|
||
|
}
|
||
|
|
||
|
// 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{
|
||
|
"dicts": &bintree{nil, map[string]*bintree{
|
||
|
"de_DE.toml": &bintree{dictsDe_deToml, map[string]*bintree{}},
|
||
|
"en_US.toml": &bintree{dictsEn_usToml, map[string]*bintree{}},
|
||
|
"tt_TT.toml": &bintree{dictsTt_ttToml, map[string]*bintree{}},
|
||
|
"zh_CN.toml": &bintree{dictsZh_cnToml, 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, "/")...)...)
|
||
|
}
|