@cryptotaxi247 / kubo / commits / 33dfa6f64

lint

Juan Batiz-Benet committed Oct 1, 2014 at 02:30 UTC 33dfa6f6408b0c38430b88f36280f905890d0b44
1 file changed +9 -4
config/config.go
+9 -4
@@ -43,9 +43,16 @@ type Config struct {
43 Bootstrap []*BootstrapPeer // local nodes's bootstrap peers
44 }
45
46 +// DefaultPathRoot is the path to the default config dir location.
47 const DefaultPathRoot = "~/.go-ipfs"
48 +
49 +// DefaultConfigFile is the filename of the configuration file
50 const DefaultConfigFile = "config"
51 +
52 +// DefaultDataStoreDirectory is the directory to store all the local IPFS data.
53 const DefaultDataStoreDirectory = "datastore"
54 +
55 +// EnvDir is the environment variable used to change the path root.
56 const EnvDir = "IPFS_DIR"
57
58 // PathRoot returns the default configuration root directory
@@ -65,13 +72,11 @@ func Path(configroot, extension string) (string, error) {
72 dir, err := PathRoot()
73 if err != nil {
74 return "", err
68 - } else {
69 - return filepath.Join(dir, extension), nil
75 }
76 + return filepath.Join(dir, extension), nil
77
72 - } else {
73 - return filepath.Join(configroot, extension), nil
78 }
79 + return filepath.Join(configroot, extension), nil
80 }
81
82 // DataStorePath returns the default data store path given a configuration root