mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
cmd/faucet: regenerate
This commit is contained in:
parent
0fbef8e427
commit
390bc457af
2 changed files with 11 additions and 15 deletions
|
|
@ -18,6 +18,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
//go:generate go-bindata -nometadata -o website.go faucet.html
|
//go:generate go-bindata -nometadata -o website.go faucet.html
|
||||||
|
//go:generate gofmt -w -s website.go
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
// Code generated by go-bindata.
|
// Code generated by go-bindata. DO NOT EDIT.
|
||||||
// sources:
|
// sources:
|
||||||
// faucet.html
|
// faucet.html
|
||||||
// DO NOT EDIT!
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
@ -92,8 +91,8 @@ func faucetHtml() (*asset, error) {
|
||||||
// It returns an error if the asset could not be found or
|
// It returns an error if the asset could not be found or
|
||||||
// could not be loaded.
|
// could not be loaded.
|
||||||
func Asset(name string) ([]byte, error) {
|
func Asset(name string) ([]byte, error) {
|
||||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||||
if f, ok := _bindata[cannonicalName]; ok {
|
if f, ok := _bindata[canonicalName]; ok {
|
||||||
a, err := f()
|
a, err := f()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
||||||
|
|
@ -118,8 +117,8 @@ func MustAsset(name string) []byte {
|
||||||
// It returns an error if the asset could not be found or
|
// It returns an error if the asset could not be found or
|
||||||
// could not be loaded.
|
// could not be loaded.
|
||||||
func AssetInfo(name string) (os.FileInfo, error) {
|
func AssetInfo(name string) (os.FileInfo, error) {
|
||||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||||
if f, ok := _bindata[cannonicalName]; ok {
|
if f, ok := _bindata[canonicalName]; ok {
|
||||||
a, err := f()
|
a, err := f()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
|
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
|
||||||
|
|
@ -159,8 +158,8 @@ var _bindata = map[string]func() (*asset, error){
|
||||||
func AssetDir(name string) ([]string, error) {
|
func AssetDir(name string) ([]string, error) {
|
||||||
node := _bintree
|
node := _bintree
|
||||||
if len(name) != 0 {
|
if len(name) != 0 {
|
||||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||||
pathList := strings.Split(cannonicalName, "/")
|
pathList := strings.Split(canonicalName, "/")
|
||||||
for _, p := range pathList {
|
for _, p := range pathList {
|
||||||
node = node.Children[p]
|
node = node.Children[p]
|
||||||
if node == nil {
|
if node == nil {
|
||||||
|
|
@ -205,11 +204,7 @@ func RestoreAsset(dir, name string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
return 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
|
// RestoreAssets restores an asset under the given directory recursively
|
||||||
|
|
@ -230,6 +225,6 @@ func RestoreAssets(dir, name string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func _filePath(dir, name string) string {
|
func _filePath(dir, name string) string {
|
||||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue