cmd/clef: extend go generate to format asset file

This commit is contained in:
Péter Szilágyi 2019-04-11 13:08:38 +03:00
parent bb9fd61b76
commit 06a43b76db
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D
2 changed files with 17 additions and 16 deletions

View file

@ -84,7 +84,7 @@ func resources4byteJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "resources/4byte.json", size: 5500821, mode: os.FileMode(0664), modTime: time.Unix(1552398455, 0)}
info := bindataFileInfo{name: "resources/4byte.json", size: 5500821, mode: os.FileMode(420), modTime: time.Unix(1554975984, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x86, 0xc8, 0x50, 0xc5, 0x1c, 0xeb, 0xbb, 0xd, 0xf9, 0x16, 0x1a, 0xde, 0xa0, 0x5, 0x2f, 0xdd, 0xfe, 0x56, 0x2d, 0xfb, 0x3b, 0xa4, 0x9c, 0xf3, 0x1b, 0xdb, 0xd0, 0x2f, 0xd, 0xc5, 0x12, 0xc1}}
return a, nil
}
@ -224,8 +224,8 @@ type bintree struct {
}
var _bintree = &bintree{nil, map[string]*bintree{
"resources": &bintree{nil, map[string]*bintree{
"4byte.json": &bintree{resources4byteJson, map[string]*bintree{}},
"resources": {nil, map[string]*bintree{
"4byte.json": {resources4byteJson, map[string]*bintree{}},
}},
}}

View file

@ -18,7 +18,8 @@
// arbitrary data.
package main
//go:generate go-bindata -o ./bindata.go ./resources/4byte.json
//go:generate go-bindata -o bindata.go resources/4byte.json
//go:generate gofmt -s -w bindata.go
import (
"bufio"
@ -59,16 +60,16 @@ import (
)
const legalWarning = `
WARNING!
WARNING!
Clef is an account management tool. It may, like any software, contain bugs.
Clef is an account management tool. It may, like any software, contain bugs.
Please take care to
- backup your keystore files,
- backup your keystore files,
- verify that the keystore(s) can be opened with your password.
Clef is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Clef is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
`
@ -142,7 +143,7 @@ var (
configdirFlag,
},
Description: `
The init command generates a master seed which Clef can use to store credentials and data needed for
The init command generates a master seed which Clef can use to store credentials and data needed for
the rule-engine to work.`,
}
attestCommand = cli.Command{
@ -156,10 +157,10 @@ the rule-engine to work.`,
signerSecretFlag,
},
Description: `
The attest command stores the sha256 of the rule.js-file that you want to use for automatic processing of
incoming requests.
The attest command stores the sha256 of the rule.js-file that you want to use for automatic processing of
incoming requests.
Whenever you make an edit to the rule file, you need to use attestation to tell
Whenever you make an edit to the rule file, you need to use attestation to tell
Clef that the file is 'safe' to execute.`,
}
@ -174,7 +175,7 @@ Clef that the file is 'safe' to execute.`,
signerSecretFlag,
},
Description: `
The setpw command stores a password for a given address (keyfile). If you enter a blank passphrase, it will
The setpw command stores a password for a given address (keyfile). If you enter a blank passphrase, it will
remove any stored credential for that address (keyfile)
`}
gendocCommand = cli.Command{
@ -269,12 +270,12 @@ func initializeSecrets(c *cli.Context) error {
}
fmt.Printf("A master seed has been generated into %s\n", location)
fmt.Printf(`
This is required to be able to store credentials, such as :
This is required to be able to store credentials, such as :
* Passwords for keystores (used by rule engine)
* Storage for javascript rules
* Hash of rule-file
You should treat that file with utmost secrecy, and make a backup of it.
You should treat that file with utmost secrecy, and make a backup of it.
NOTE: This file does not contain your accounts. Those need to be backed up separately!
`)