From 569a138e212bbe31e09b221b43fd4d443e26ba0c Mon Sep 17 00:00:00 2001 From: John Brooks Date: Sat, 5 Nov 2016 16:48:54 -0600 Subject: [PATCH] core: Config path is a file, not a directory --- core/config.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/config.go b/core/config.go index 71eb22f..73ecd67 100644 --- a/core/config.go +++ b/core/config.go @@ -5,7 +5,6 @@ import ( "io/ioutil" "log" "os" - "path/filepath" "sync" ) @@ -14,7 +13,6 @@ import ( // an automatic import function. type Config struct { - path string filePath string root ConfigRoot @@ -52,10 +50,9 @@ type ConfigIdentity struct { ServiceKey string } -func LoadConfig(configPath string) (*Config, error) { +func LoadConfig(filePath string) (*Config, error) { config := &Config{ - path: configPath, - filePath: filepath.Join(configPath, "ricochet.json"), + filePath: filePath, } data, err := ioutil.ReadFile(config.filePath) @@ -69,7 +66,6 @@ func LoadConfig(configPath string) (*Config, error) { return nil, err } - log.Printf("Config: %v", config.root) return config, nil }