From c0a72e7e3d4b11b5e7fb7f86af3ecfb868afa2db Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 19 May 2018 21:34:11 +0200 Subject: [PATCH] fix + explicit name (because all in same package) --- config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.go b/config.go index 50414d4..9fe783f 100644 --- a/config.go +++ b/config.go @@ -5,10 +5,10 @@ import ( "os" ) -// Load builds a struct representation of the +// LoadConfig builds a struct representation of the // configuration file located at @path // The structure checks for most format errors -func Load(path string) (*controller, error) { +func LoadConfig(path string) (*controller, error) { /* (1) Extract data ---------------------------------------------------------*/ @@ -20,7 +20,7 @@ func Load(path string) (*controller, error) { defer configFile.Close() /* (2) Init receiving dataset */ - var receiver *controller + receiver := &controller{} /* (3) Decode JSON */ decoder := json.NewDecoder(configFile)