I've a package with global variables related to a file open (*os.File), and its logger associated. By another side, I'll build several commands that are going to use that package and I want not open the file to set it as logger every time I run a command.
So, the first program to run will set the global variables, and here is my question:
Do the next programs to use the package can access to those global variables without problem? It could be created a command with a flag to initialize those values before of be used by another programs, and another flag to finish it (unset the global variables in the package).
If that is not possible, which is the best option to avoid such IO-bound? To use a server in Unix sockets?