fix + explicit name (because all in same package)

This commit is contained in:
Adrien Marquès 2018-05-19 21:34:11 +02:00
parent 1aa64072b1
commit c0a72e7e3d
1 changed files with 3 additions and 3 deletions

View File

@ -5,10 +5,10 @@ import (
"os" "os"
) )
// Load builds a struct representation of the // LoadConfig builds a struct representation of the
// configuration file located at @path // configuration file located at @path
// The structure checks for most format errors // The structure checks for most format errors
func Load(path string) (*controller, error) { func LoadConfig(path string) (*controller, error) {
/* (1) Extract data /* (1) Extract data
---------------------------------------------------------*/ ---------------------------------------------------------*/
@ -20,7 +20,7 @@ func Load(path string) (*controller, error) {
defer configFile.Close() defer configFile.Close()
/* (2) Init receiving dataset */ /* (2) Init receiving dataset */
var receiver *controller receiver := &controller{}
/* (3) Decode JSON */ /* (3) Decode JSON */
decoder := json.NewDecoder(configFile) decoder := json.NewDecoder(configFile)