512 lines
20 KiB
Go
512 lines
20 KiB
Go
|
// Code generated by go-bindata.
|
||
|
// sources:
|
||
|
// translations/kubectl/default/LC_MESSAGES/k8s.mo
|
||
|
// translations/kubectl/default/LC_MESSAGES/k8s.po
|
||
|
// translations/kubectl/en_US/LC_MESSAGES/k8s.mo
|
||
|
// translations/kubectl/en_US/LC_MESSAGES/k8s.po
|
||
|
// translations/test/default/LC_MESSAGES/k8s.mo
|
||
|
// translations/test/default/LC_MESSAGES/k8s.po
|
||
|
// translations/test/en_US/LC_MESSAGES/k8s.mo
|
||
|
// translations/test/en_US/LC_MESSAGES/k8s.po
|
||
|
// DO NOT EDIT!
|
||
|
|
||
|
package generated
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"io/ioutil"
|
||
|
"os"
|
||
|
"path/filepath"
|
||
|
"strings"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
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 _translationsKubectlDefaultLc_messagesK8sMo = []byte("\xde\x12\x04\x95\x00\x00\x00\x00\x03\x00\x00\x00\x1c\x00\x00\x004\x00\x00\x00\x05\x00\x00\x00L\x00\x00\x00\x00\x00\x00\x00`\x00\x00\x00I\x00\x00\x00a\x00\x00\x00(\x01\x00\x00\xab\x00\x00\x00\xac\x01\x00\x00\xd4\x01\x00\x00$\x00\x00\x00\x81\x03\x00\x00\xc3\x00\x00\x00\xa6\x03\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00Update the annotations on a resource\x04Update the annotations on a resource\x00watch is only supported on individual resources and resource collections - %d resources were found\x04watch is only supported on individual resources and resource collections - %d resources were found\x00watch is only supported on individual resources and resource collections - %d resources were found\x00Project-Id-Version: gettext-go-examples-hello\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2013-12-12 20:03+0000\nPO-Revision-Date: 2016-12-13 21:54-0800\nLast-Translator: Brendan Burns <brendan.d.burns@gmail.com>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nX-Generator: Poedit 1.6.10\nX-Poedit-SourceCharset: UTF-8\nLanguage-Team: \nPlural-Forms: nplurals=2; plural=(n != 1);\nLanguage: en\n\x00Update the annotations on a resource\x00watch is only supported on individual resources and resource collections - %d resource was found\x00watch is only supported on individual resources and resource collections - %d resources were found\x00")
|
||
|
|
||
|
func translationsKubectlDefaultLc_messagesK8sMoBytes() ([]byte, error) {
|
||
|
return _translationsKubectlDefaultLc_messagesK8sMo, nil
|
||
|
}
|
||
|
|
||
|
func translationsKubectlDefaultLc_messagesK8sMo() (*asset, error) {
|
||
|
bytes, err := translationsKubectlDefaultLc_messagesK8sMoBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "translations/kubectl/default/LC_MESSAGES/k8s.mo", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _translationsKubectlDefaultLc_messagesK8sPo = []byte(`# Test translations for unit tests.
|
||
|
# Copyright (C) 2016
|
||
|
# This file is distributed under the same license as the PACKAGE package.
|
||
|
# FIRST AUTHOR brendan.d.burns@gmail.com, 2016.
|
||
|
#
|
||
|
msgid ""
|
||
|
msgstr ""
|
||
|
"Project-Id-Version: gettext-go-examples-hello\n"
|
||
|
"Report-Msgid-Bugs-To: \n"
|
||
|
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
|
||
|
"PO-Revision-Date: 2016-12-13 21:54-0800\n"
|
||
|
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
|
||
|
"MIME-Version: 1.0\n"
|
||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||
|
"Content-Transfer-Encoding: 8bit\n"
|
||
|
"X-Generator: Poedit 1.6.10\n"
|
||
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||
|
"Language-Team: \n"
|
||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||
|
"Language: en\n"
|
||
|
|
||
|
msgctxt "Update the annotations on a resource"
|
||
|
msgid "Update the annotations on a resource"
|
||
|
msgstr "Update the annotations on a resource"
|
||
|
|
||
|
msgctxt ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resources were found"
|
||
|
msgid ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resources were found"
|
||
|
msgid_plural ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resources were found"
|
||
|
msgstr[0] ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resource was found"
|
||
|
msgstr[1] ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resources were found"
|
||
|
`)
|
||
|
|
||
|
func translationsKubectlDefaultLc_messagesK8sPoBytes() ([]byte, error) {
|
||
|
return _translationsKubectlDefaultLc_messagesK8sPo, nil
|
||
|
}
|
||
|
|
||
|
func translationsKubectlDefaultLc_messagesK8sPo() (*asset, error) {
|
||
|
bytes, err := translationsKubectlDefaultLc_messagesK8sPoBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "translations/kubectl/default/LC_MESSAGES/k8s.po", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _translationsKubectlEn_usLc_messagesK8sMo = []byte("\xde\x12\x04\x95\x00\x00\x00\x00\x03\x00\x00\x00\x1c\x00\x00\x004\x00\x00\x00\x05\x00\x00\x00L\x00\x00\x00\x00\x00\x00\x00`\x00\x00\x00I\x00\x00\x00a\x00\x00\x00(\x01\x00\x00\xab\x00\x00\x00\xac\x01\x00\x00\xd4\x01\x00\x00$\x00\x00\x00\x81\x03\x00\x00\xc3\x00\x00\x00\xa6\x03\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00Update the annotations on a resource\x04Update the annotations on a resource\x00watch is only supported on individual resources and resource collections - %d resources were found\x04watch is only supported on individual resources and resource collections - %d resources were found\x00watch is only supported on individual resources and resource collections - %d resources were found\x00Project-Id-Version: gettext-go-examples-hello\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2013-12-12 20:03+0000\nPO-Revision-Date: 2016-12-13 22:35-0800\nLast-Translator: Brendan Burns <brendan.d.burns@gmail.com>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nX-Generator: Poedit 1.6.10\nX-Poedit-SourceCharset: UTF-8\nLanguage-Team: \nPlural-Forms: nplurals=2; plural=(n != 1);\nLanguage: en\n\x00Update the annotations on a resource\x00watch is only supported on individual resources and resource collections - %d resource was found\x00watch is only supported on individual resources and resource collections - %d resources were found\x00")
|
||
|
|
||
|
func translationsKubectlEn_usLc_messagesK8sMoBytes() ([]byte, error) {
|
||
|
return _translationsKubectlEn_usLc_messagesK8sMo, nil
|
||
|
}
|
||
|
|
||
|
func translationsKubectlEn_usLc_messagesK8sMo() (*asset, error) {
|
||
|
bytes, err := translationsKubectlEn_usLc_messagesK8sMoBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "translations/kubectl/en_US/LC_MESSAGES/k8s.mo", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _translationsKubectlEn_usLc_messagesK8sPo = []byte(`# Test translations for unit tests.
|
||
|
# Copyright (C) 2016
|
||
|
# This file is distributed under the same license as the PACKAGE package.
|
||
|
# FIRST AUTHOR brendan.d.burns@gmail.com, 2016.
|
||
|
#
|
||
|
msgid ""
|
||
|
msgstr ""
|
||
|
"Project-Id-Version: gettext-go-examples-hello\n"
|
||
|
"Report-Msgid-Bugs-To: \n"
|
||
|
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
|
||
|
"PO-Revision-Date: 2016-12-13 22:35-0800\n"
|
||
|
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
|
||
|
"MIME-Version: 1.0\n"
|
||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||
|
"Content-Transfer-Encoding: 8bit\n"
|
||
|
"X-Generator: Poedit 1.6.10\n"
|
||
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||
|
"Language-Team: \n"
|
||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||
|
"Language: en\n"
|
||
|
|
||
|
msgctxt "Update the annotations on a resource"
|
||
|
msgid "Update the annotations on a resource"
|
||
|
msgstr "Update the annotations on a resource"
|
||
|
|
||
|
msgctxt ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resources were found"
|
||
|
msgid ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resources were found"
|
||
|
msgid_plural ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resources were found"
|
||
|
msgstr[0] ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resource was found"
|
||
|
msgstr[1] ""
|
||
|
"watch is only supported on individual resources and resource collections - "
|
||
|
"%d resources were found"
|
||
|
`)
|
||
|
|
||
|
func translationsKubectlEn_usLc_messagesK8sPoBytes() ([]byte, error) {
|
||
|
return _translationsKubectlEn_usLc_messagesK8sPo, nil
|
||
|
}
|
||
|
|
||
|
func translationsKubectlEn_usLc_messagesK8sPo() (*asset, error) {
|
||
|
bytes, err := translationsKubectlEn_usLc_messagesK8sPoBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "translations/kubectl/en_US/LC_MESSAGES/k8s.po", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _translationsTestDefaultLc_messagesK8sMo = []byte("\xde\x12\x04\x95\x00\x00\x00\x00\x03\x00\x00\x00\x1c\x00\x00\x004\x00\x00\x00\x05\x00\x00\x00L\x00\x00\x00\x00\x00\x00\x00`\x00\x00\x00#\x00\x00\x00a\x00\x00\x00\x17\x00\x00\x00\x85\x00\x00\x00\xac\x01\x00\x00\x9d\x00\x00\x00%\x00\x00\x00J\x02\x00\x00\x03\x00\x00\x00p\x02\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00test_plural\x04test_plural\x00test_plural\x00test_string\x04test_string\x00Project-Id-Version: gettext-go-examples-hello\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2013-12-12 20:03+0000\nPO-Revision-Date: 2016-12-13 21:35-0800\nLast-Translator: Brendan Burns <brendan.d.burns@gmail.com>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nX-Generator: Poedit 1.6.10\nX-Poedit-SourceCharset: UTF-8\nLanguage-Team: \nPlural-Forms: nplurals=2; plural=(n != 1);\nLanguage: en\n\x00there was %d item\x00there were %d items\x00foo\x00")
|
||
|
|
||
|
func translationsTestDefaultLc_messagesK8sMoBytes() ([]byte, error) {
|
||
|
return _translationsTestDefaultLc_messagesK8sMo, nil
|
||
|
}
|
||
|
|
||
|
func translationsTestDefaultLc_messagesK8sMo() (*asset, error) {
|
||
|
bytes, err := translationsTestDefaultLc_messagesK8sMoBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "translations/test/default/LC_MESSAGES/k8s.mo", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _translationsTestDefaultLc_messagesK8sPo = []byte(`# Test translations for unit tests.
|
||
|
# Copyright (C) 2016
|
||
|
# This file is distributed under the same license as the PACKAGE package.
|
||
|
# FIRST AUTHOR brendan.d.burns@gmail.com, 2016.
|
||
|
#
|
||
|
msgid ""
|
||
|
msgstr ""
|
||
|
"Project-Id-Version: gettext-go-examples-hello\n"
|
||
|
"Report-Msgid-Bugs-To: \n"
|
||
|
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
|
||
|
"PO-Revision-Date: 2016-12-13 21:35-0800\n"
|
||
|
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
|
||
|
"MIME-Version: 1.0\n"
|
||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||
|
"Content-Transfer-Encoding: 8bit\n"
|
||
|
"X-Generator: Poedit 1.6.10\n"
|
||
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||
|
"Language-Team: \n"
|
||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||
|
"Language: en\n"
|
||
|
|
||
|
msgctxt "test_string"
|
||
|
msgid "test_string"
|
||
|
msgstr "foo"
|
||
|
|
||
|
msgctxt "test_plural"
|
||
|
msgid "test_plural"
|
||
|
msgid_plural "test_plural"
|
||
|
msgstr[0] "there was %d item"
|
||
|
msgstr[1] "there were %d items"
|
||
|
`)
|
||
|
|
||
|
func translationsTestDefaultLc_messagesK8sPoBytes() ([]byte, error) {
|
||
|
return _translationsTestDefaultLc_messagesK8sPo, nil
|
||
|
}
|
||
|
|
||
|
func translationsTestDefaultLc_messagesK8sPo() (*asset, error) {
|
||
|
bytes, err := translationsTestDefaultLc_messagesK8sPoBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "translations/test/default/LC_MESSAGES/k8s.po", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _translationsTestEn_usLc_messagesK8sMo = []byte("\xde\x12\x04\x95\x00\x00\x00\x00\x03\x00\x00\x00\x1c\x00\x00\x004\x00\x00\x00\x05\x00\x00\x00L\x00\x00\x00\x00\x00\x00\x00`\x00\x00\x00#\x00\x00\x00a\x00\x00\x00\x17\x00\x00\x00\x85\x00\x00\x00\xac\x01\x00\x00\x9d\x00\x00\x00%\x00\x00\x00J\x02\x00\x00\x03\x00\x00\x00p\x02\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00test_plural\x04test_plural\x00test_plural\x00test_string\x04test_string\x00Project-Id-Version: gettext-go-examples-hello\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2013-12-12 20:03+0000\nPO-Revision-Date: 2016-12-13 22:12-0800\nLast-Translator: Brendan Burns <brendan.d.burns@gmail.com>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nX-Generator: Poedit 1.6.10\nX-Poedit-SourceCharset: UTF-8\nLanguage-Team: \nPlural-Forms: nplurals=2; plural=(n != 1);\nLanguage: en\n\x00there was %d item\x00there were %d items\x00baz\x00")
|
||
|
|
||
|
func translationsTestEn_usLc_messagesK8sMoBytes() ([]byte, error) {
|
||
|
return _translationsTestEn_usLc_messagesK8sMo, nil
|
||
|
}
|
||
|
|
||
|
func translationsTestEn_usLc_messagesK8sMo() (*asset, error) {
|
||
|
bytes, err := translationsTestEn_usLc_messagesK8sMoBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "translations/test/en_US/LC_MESSAGES/k8s.mo", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
|
||
|
a := &asset{bytes: bytes, info: info}
|
||
|
return a, nil
|
||
|
}
|
||
|
|
||
|
var _translationsTestEn_usLc_messagesK8sPo = []byte(`# Test translations for unit tests.
|
||
|
# Copyright (C) 2016
|
||
|
# This file is distributed under the same license as the PACKAGE package.
|
||
|
# FIRST AUTHOR brendan.d.burns@gmail.com, 2016.
|
||
|
#
|
||
|
msgid ""
|
||
|
msgstr ""
|
||
|
"Project-Id-Version: gettext-go-examples-hello\n"
|
||
|
"Report-Msgid-Bugs-To: \n"
|
||
|
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
|
||
|
"PO-Revision-Date: 2016-12-13 22:12-0800\n"
|
||
|
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
|
||
|
"MIME-Version: 1.0\n"
|
||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||
|
"Content-Transfer-Encoding: 8bit\n"
|
||
|
"X-Generator: Poedit 1.6.10\n"
|
||
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||
|
"Language-Team: \n"
|
||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||
|
"Language: en\n"
|
||
|
|
||
|
msgctxt "test_string"
|
||
|
msgid "test_string"
|
||
|
msgstr "baz"
|
||
|
|
||
|
msgctxt "test_plural"
|
||
|
msgid "test_plural"
|
||
|
msgid_plural "test_plural"
|
||
|
msgstr[0] "there was %d item"
|
||
|
msgstr[1] "there were %d items"
|
||
|
`)
|
||
|
|
||
|
func translationsTestEn_usLc_messagesK8sPoBytes() ([]byte, error) {
|
||
|
return _translationsTestEn_usLc_messagesK8sPo, nil
|
||
|
}
|
||
|
|
||
|
func translationsTestEn_usLc_messagesK8sPo() (*asset, error) {
|
||
|
bytes, err := translationsTestEn_usLc_messagesK8sPoBytes()
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
info := bindataFileInfo{name: "translations/test/en_US/LC_MESSAGES/k8s.po", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 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){
|
||
|
"translations/kubectl/default/LC_MESSAGES/k8s.mo": translationsKubectlDefaultLc_messagesK8sMo,
|
||
|
"translations/kubectl/default/LC_MESSAGES/k8s.po": translationsKubectlDefaultLc_messagesK8sPo,
|
||
|
"translations/kubectl/en_US/LC_MESSAGES/k8s.mo": translationsKubectlEn_usLc_messagesK8sMo,
|
||
|
"translations/kubectl/en_US/LC_MESSAGES/k8s.po": translationsKubectlEn_usLc_messagesK8sPo,
|
||
|
"translations/test/default/LC_MESSAGES/k8s.mo": translationsTestDefaultLc_messagesK8sMo,
|
||
|
"translations/test/default/LC_MESSAGES/k8s.po": translationsTestDefaultLc_messagesK8sPo,
|
||
|
"translations/test/en_US/LC_MESSAGES/k8s.mo": translationsTestEn_usLc_messagesK8sMo,
|
||
|
"translations/test/en_US/LC_MESSAGES/k8s.po": translationsTestEn_usLc_messagesK8sPo,
|
||
|
}
|
||
|
|
||
|
// 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{
|
||
|
"translations": {nil, map[string]*bintree{
|
||
|
"kubectl": {nil, map[string]*bintree{
|
||
|
"default": {nil, map[string]*bintree{
|
||
|
"LC_MESSAGES": {nil, map[string]*bintree{
|
||
|
"k8s.mo": {translationsKubectlDefaultLc_messagesK8sMo, map[string]*bintree{}},
|
||
|
"k8s.po": {translationsKubectlDefaultLc_messagesK8sPo, map[string]*bintree{}},
|
||
|
}},
|
||
|
}},
|
||
|
"en_US": {nil, map[string]*bintree{
|
||
|
"LC_MESSAGES": {nil, map[string]*bintree{
|
||
|
"k8s.mo": {translationsKubectlEn_usLc_messagesK8sMo, map[string]*bintree{}},
|
||
|
"k8s.po": {translationsKubectlEn_usLc_messagesK8sPo, map[string]*bintree{}},
|
||
|
}},
|
||
|
}},
|
||
|
}},
|
||
|
"test": {nil, map[string]*bintree{
|
||
|
"default": {nil, map[string]*bintree{
|
||
|
"LC_MESSAGES": {nil, map[string]*bintree{
|
||
|
"k8s.mo": {translationsTestDefaultLc_messagesK8sMo, map[string]*bintree{}},
|
||
|
"k8s.po": {translationsTestDefaultLc_messagesK8sPo, map[string]*bintree{}},
|
||
|
}},
|
||
|
}},
|
||
|
"en_US": {nil, map[string]*bintree{
|
||
|
"LC_MESSAGES": {nil, map[string]*bintree{
|
||
|
"k8s.mo": {translationsTestEn_usLc_messagesK8sMo, map[string]*bintree{}},
|
||
|
"k8s.po": {translationsTestEn_usLc_messagesK8sPo, 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, "/")...)...)
|
||
|
}
|