2020-09-28

Where should I build a Slack client inside a custom Go package

I am working on a Go package using "https://ift.tt/30foECH" module. Roughly, my function structure goes like this:

entry:
 function:
  function:
    very large loop:
      function:
        posting to Slack somewhere in here

Should I build a thousand clients with "slack_client := slack.New(.." down the bottom or do it once right at the entry? If the latter, what is the preferred way to pass it down to the bottom? I am very new to Go. Thanks,



from Recent Questions - Stack Overflow https://ift.tt/2S4mOQB
https://ift.tt/eA8V8J

No comments:

Post a Comment