tweaks and fixes

This commit is contained in:
simonkellet
2022-08-23 14:52:06 +01:00
parent 6f5ab2ded6
commit 7325d252c7
6 changed files with 64 additions and 43 deletions
+2 -1
View File
@@ -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