title: Set a global variable only once in golang
body: <p>I have a main.go file which has:</p>
  
  <pre><code>// running the router in port 9000
  func main() {
      router := routers.InitApp()
      router.RunTLS(":9000" , "domain.crt" , "domain.key")
  }
  </code></pre>
  
  <p>In another gofile I have</p>
  
  <pre><code>package utils
  var ConfigMap = GetAppConfig
  func GetAppConfig() map[string]string{
   ....//
  }
  </code></pre>
  
  <p>ConfigMap being a global variable , everytime I try to access <code>utils.ConfigMap</code> map the <code>GetAppConfig</code> function is called. How can I call this function only once while by app initializes and then access the ConfigMap anyehere I want in the go project.</p>