A
A
Andrey2018-11-14 22:30:59
go
Andrey, 2018-11-14 22:30:59

How to pass global variables between package?

Hello!
Actually, there is an application that will serve the rest of the front using gin.
The application has a configuration that is declared and read in the package main.
How can I correctly transfer this configuration to the package that will store the handlers directly?
Well, in general, thanks in advance for any comments on the code :-)
Code on github

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Melnikov, 2018-11-14
@VladimirAndreev

Anything with a capital letter is exported from the package.
Nothing more needs to be done.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question