Created
April 5, 2020 05:35
-
-
Save presmihaylov/7399b1fc50bd2395d266fd423ad21106 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// ProvideConfig provides the standard configuration to fx | |
func ProvideConfig() *Config { | |
conf := Config{} | |
data, err := ioutil.ReadFile("config/base.yaml") | |
// handle error | |
err = yaml.Unmarshal([]byte(data), &conf) | |
// handle error | |
return &conf | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment