31333337 / bmrng

1 stars 2 forks source link

feat: extract logger pkg, add timestamps #46

Closed xendarboh closed 12 months ago

xendarboh commented 12 months ago
mirrir0 commented 12 months ago

👍 looks good but im also wondering where the logger is instantiated ? init() doesnt look like its getting called anywhere?

xendarboh commented 12 months ago

searched for a common pattern to abstract zap's sugar behind logger. for clarity, and found this use of init()

init() doesnt look like its getting called anywhere?

In Go, the predefined init() function sets off a piece of code to run before any other part of your package. This code will execute as soon as the package is imported...

https://www.digitalocean.com/community/tutorials/understanding-init-in-go