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(),