Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
33dfa6f6
Commit
33dfa6f6
authored
Oct 01, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint
parent
b6a59c90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
config/config.go
config/config.go
+9
-4
No files found.
config/config.go
View file @
33dfa6f6
...
...
@@ -43,9 +43,16 @@ type Config struct {
Bootstrap
[]
*
BootstrapPeer
// local nodes's bootstrap peers
}
// DefaultPathRoot is the path to the default config dir location.
const
DefaultPathRoot
=
"~/.go-ipfs"
// DefaultConfigFile is the filename of the configuration file
const
DefaultConfigFile
=
"config"
// DefaultDataStoreDirectory is the directory to store all the local IPFS data.
const
DefaultDataStoreDirectory
=
"datastore"
// EnvDir is the environment variable used to change the path root.
const
EnvDir
=
"IPFS_DIR"
// PathRoot returns the default configuration root directory
...
...
@@ -65,13 +72,11 @@ func Path(configroot, extension string) (string, error) {
dir
,
err
:=
PathRoot
()
if
err
!=
nil
{
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment