1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-31 10:20:55 +00:00

golint part 1

This commit is contained in:
Kane York 2015-11-15 18:43:34 -08:00
parent aa6f090fcc
commit 66cc124e37
9 changed files with 136 additions and 112 deletions

View file

@ -11,14 +11,14 @@ import (
"os"
)
var configFilename *string = flag.String("config", "config.json", "Configuration file, including the keypairs for the NaCl crypto library, for communicating with the backend.")
var generateKeys *bool = flag.Bool("genkeys", false, "Generate NaCl keys instead of serving requests.\nArguments: [int serverId] [base64 backendPublic]\nThe backend public key can either be specified in base64 on the command line, or put in the json file later.")
var configFilename = flag.String("config", "config.json", "Configuration file, including the keypairs for the NaCl crypto library, for communicating with the backend.")
var flagGenerateKeys = flag.Bool("genkeys", false, "Generate NaCl keys instead of serving requests.\nArguments: [int serverId] [base64 backendPublic]\nThe backend public key can either be specified in base64 on the command line, or put in the json file later.")
func main() {
flag.Parse()
if *generateKeys {
GenerateKeys(*configFilename)
if *flagGenerateKeys {
generateKeys(*configFilename)
return
}
@ -66,7 +66,7 @@ func main() {
}
}
func GenerateKeys(outputFile string) {
func generateKeys(outputFile string) {
if flag.NArg() < 1 {
fmt.Println("Specify a numeric server ID after -genkeys")
os.Exit(2)