i am new in Go and using viper for configuration management
configuration file looks like (config.yaml)
SD_ORIGIN : web url
API_TRACKING_ID : 77xxx1
API_TOKEN : sdsaxxxdfds123
And using the go code to read the value but getting null value while i read code snippet as :-
viper.SetConfigName("config")
viper.AddConfigPath(".")
err := viper.ReadInConfig()
if err != nil {
fmt.Println("Config not found...")
}
}
var apiTrackingID = viper.GetString("API_TRACKING_ID")
Please help to find the issue in my config file or implementation in Go.