From 6389874fdb1a6a909cbd8a52d93eb5215bd38503 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 8 Dec 2016 23:30:48 +0300 Subject: [PATCH] It is better to work directly with structs, returning pointer when necessary --- src/cypherpunks.ru/govpn/client/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cypherpunks.ru/govpn/client/client.go b/src/cypherpunks.ru/govpn/client/client.go index 8e796f7..76635a8 100644 --- a/src/cypherpunks.ru/govpn/client/client.go +++ b/src/cypherpunks.ru/govpn/client/client.go @@ -129,7 +129,7 @@ MainCycle: } func NewClient(conf Configuration, verifier *govpn.Verifier, termSignal chan os.Signal) *Client { - client := &Client{ + client := Client{ idsCache: govpn.NewMACCache(), firstUpCall: true, config: conf, @@ -138,5 +138,5 @@ func NewClient(conf Configuration, verifier *govpn.Verifier, termSignal chan os. } confs := map[govpn.PeerId]*govpn.PeerConf{*verifier.Id: conf.Peer} client.idsCache.Update(&confs) - return client + return &client } -- 2.44.0