X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcmd%2Fnncp-cfgmin%2Fmain.go;h=bc50792325ab4757c80b85667f4fb7e7f2c4be40;hb=0367cce2741e1ce6a89a49fd5c4e9df6005c9744;hp=b8eae7ef3e29f2e39f0316d4b9411c12936d64dc;hpb=271870ad4f56253e0918f673b90615e4749cf201;p=nncp.git diff --git a/src/cmd/nncp-cfgmin/main.go b/src/cmd/nncp-cfgmin/main.go index b8eae7e..bc50792 100644 --- a/src/cmd/nncp-cfgmin/main.go +++ b/src/cmd/nncp-cfgmin/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2020 Sergey Matveev +Copyright (C) 2016-2022 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ import ( "os" "github.com/hjson/hjson-go" - "go.cypherpunks.ru/nncp/v5" + "go.cypherpunks.ru/nncp/v8" ) func usage() { @@ -41,6 +41,7 @@ func main() { version = flag.Bool("version", false, "Print version information") warranty = flag.Bool("warranty", false, "Print warranty information") ) + log.SetFlags(log.Lshortfile) flag.Usage = usage flag.Parse() if *warranty { @@ -65,13 +66,13 @@ func main() { for _, node := range ctx.Neigh { var noisePub *string if node.NoisePub != nil { - np := nncp.ToBase32(node.NoisePub[:]) + np := nncp.Base32Codec.EncodeToString(node.NoisePub[:]) noisePub = &np } cfg.Neigh[node.Name] = nncp.NodeJSON{ Id: node.Id.String(), - ExchPub: nncp.ToBase32(node.ExchPub[:]), - SignPub: nncp.ToBase32(node.SignPub[:]), + ExchPub: nncp.Base32Codec.EncodeToString(node.ExchPub[:]), + SignPub: nncp.Base32Codec.EncodeToString(node.SignPub[:]), NoisePub: noisePub, } }