Skip to content

Instantly share code, notes, and snippets.

@presmihaylov
Last active April 12, 2020 07:26
Show Gist options
  • Save presmihaylov/07f4eff9d893a0f71d0afdf487603698 to your computer and use it in GitHub Desktop.
Save presmihaylov/07f4eff9d893a0f71d0afdf487603698 to your computer and use it in GitHub Desktop.
func main() {
conf := &Config{}
data, err := ioutil.ReadFile("config/base.yaml")
// handle error
err = yaml.Unmarshal([]byte(data), &conf)
// handle error
...
http.ListenAndServe(conf.ApplicationConfig.Address, mux)
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment