Exit inside non-main function
uzaxirr opened this issue · comments
Description
Packages exposing functions that can stop program execution by exiting are hard to reuse. Program exits in functions other than main() or init() are not encouraged.
Occurrences
There are 4 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/ZeStream/zestream-server/issue/RVV-A0003/occurrences/
Solution
calls to log.Fatal
should be only in main()
or init()
functions. So a possible solution for this could be replacing log.Fatal
with an Error log level
I want to work on this
Hey @Missing-Parallax are you still working on this? If not I'd like to pick this up :)
Hey @akshat2602
I've assigned the issue to you!