1
0
Fork 0
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:
Henrik Hautakoski 2023-01-17 19:24:19 +01:00
parent d825f3bc50
commit 30e3d0e012

12
main.go
View file

@ -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