mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
main.go: Remove some global variables that does not need to be global.
This commit is contained in:
parent
d825f3bc50
commit
30e3d0e012
1 changed files with 3 additions and 9 deletions
12
main.go
12
main.go
|
|
@ -31,15 +31,8 @@ import (
|
|||
|
||||
var conf config.Config
|
||||
|
||||
var chainInfo *eos.InfoResp
|
||||
|
||||
var shClient *shipclient.ShipClient
|
||||
|
||||
var (
|
||||
eosClient *eos.API
|
||||
eosClientCtx = context.Background()
|
||||
)
|
||||
|
||||
var abi_mgr *abi.AbiManager
|
||||
|
||||
var publisher transport.Publisher
|
||||
|
|
@ -171,6 +164,7 @@ func init() {
|
|||
|
||||
func main() {
|
||||
var err error
|
||||
var chainInfo *eos.InfoResp
|
||||
|
||||
showHelp := getopt.BoolLong("help", 'h', "display this help text")
|
||||
showVersion := getopt.BoolLong("version", 'v', "display this help text")
|
||||
|
|
@ -236,8 +230,8 @@ func main() {
|
|||
|
||||
// Connect client and get chain info.
|
||||
log.Printf("Get chain info from api at: %s", conf.Api)
|
||||
eosClient = eos.New(conf.Api)
|
||||
chainInfo, err = eosClient.GetInfo(eosClientCtx)
|
||||
eosClient := eos.New(conf.Api)
|
||||
chainInfo, err = eosClient.GetInfo(context.Background())
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("Failed to get info")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue