mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 01:12:24 +08:00
lint
This commit is contained in:
@ -43,9 +43,16 @@ type Config struct {
|
|||||||
Bootstrap []*BootstrapPeer // local nodes's bootstrap peers
|
Bootstrap []*BootstrapPeer // local nodes's bootstrap peers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DefaultPathRoot is the path to the default config dir location.
|
||||||
const DefaultPathRoot = "~/.go-ipfs"
|
const DefaultPathRoot = "~/.go-ipfs"
|
||||||
|
|
||||||
|
// DefaultConfigFile is the filename of the configuration file
|
||||||
const DefaultConfigFile = "config"
|
const DefaultConfigFile = "config"
|
||||||
|
|
||||||
|
// DefaultDataStoreDirectory is the directory to store all the local IPFS data.
|
||||||
const DefaultDataStoreDirectory = "datastore"
|
const DefaultDataStoreDirectory = "datastore"
|
||||||
|
|
||||||
|
// EnvDir is the environment variable used to change the path root.
|
||||||
const EnvDir = "IPFS_DIR"
|
const EnvDir = "IPFS_DIR"
|
||||||
|
|
||||||
// PathRoot returns the default configuration root directory
|
// PathRoot returns the default configuration root directory
|
||||||
@ -65,13 +72,11 @@ func Path(configroot, extension string) (string, error) {
|
|||||||
dir, err := PathRoot()
|
dir, err := PathRoot()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
} else {
|
}
|
||||||
return filepath.Join(dir, extension), nil
|
return filepath.Join(dir, extension), nil
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return filepath.Join(configroot, extension), nil
|
|
||||||
}
|
}
|
||||||
|
return filepath.Join(configroot, extension), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// DataStorePath returns the default data store path given a configuration root
|
// DataStorePath returns the default data store path given a configuration root
|
||||||
|
Reference in New Issue
Block a user