tweaks and fixes
This commit is contained in:
@@ -6,12 +6,13 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func loadJson(file string) (WeatherAPI, error) {
|
||||
func loadJSON(file string) (WeatherAPI, error) {
|
||||
var config WeatherAPI
|
||||
configFile, err := os.Open(file)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
|
||||
jsonParser := json.NewDecoder(configFile)
|
||||
jsonParser.Decode(&config)
|
||||
return config, err
|
||||
|
||||
Reference in New Issue
Block a user