From c4ea51c55e2a74c786306d6607e87eab626f5591 Mon Sep 17 00:00:00 2001 From: Tue Date: Thu, 17 Nov 2022 14:15:08 +0700 Subject: [PATCH] build email --- email.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/email.go b/email.go index 2530ff7..cee542e 100644 --- a/email.go +++ b/email.go @@ -19,9 +19,13 @@ const ( KeyCreateSupplierUser = "create_user" ) +var ( + c *Client +) + // GetEmail ... func GetEmail() *Client { - return &Client{} + return c } // Client ... @@ -40,7 +44,7 @@ func NewClient(cfg Config) (*Client, error) { return nil, fmt.Errorf("nats connect failed: %v", err) } - c := &Client{ + c = &Client{ Config: cfg, natsServer: natsio.GetServer(), natsJetStream: natsio.GetJetStream(),