func loadConfig(file string) (Config, error) {
	var config Config
	configFile, err := os.Open(file)

	if err != nil {
		return Config{}, err
	}
	defer configFile.Close()

	jsonParser := json.NewDecoder(configFile)
	err = jsonParser.Decode(&config)
	if err != nil {
		return Config{}, err
	}

	return config, nil
}
// Loads Config file and returns a Config Struct
Loads Config file and returns a Config Struct
// Loads Config file and returns a Config Struct
func loadConfig(file string) (Config, error) {
	var config Config
	configFile, err := os.Open(file)
	if err != nil {
		return Config{}, err
	}
	defer configFile.Close()
	jsonParser := json.NewDecoder(configFile)
	err = jsonParser.Decode(&config)
	if err != nil {
		return Config{}, err
	}
	return config, nil
}
func loadConfig ( file string ) ( Config , error ) { var config Config configFile , err := os . Open ( file ) if err != nil { return Config { } , err } defer configFile . Close ( ) jsonParser := json . NewDecoder ( configFile ) err = jsonParser . Decode ( & config ) if err != nil { return Config { } , err } return config , nil }
Loads Config file and returns a Config Struct
Loads Config file and returns a Config Struct