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
4c167a42
Commit
4c167a42
authored
Oct 07, 2014
by
Peter Borzov
Committed by
Juan Batiz-Benet
Oct 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename config.Updates to config.Version
parent
bd9142f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
cmd/ipfs/init.go
cmd/ipfs/init.go
+2
-2
cmd/ipfs/ipfs.go
cmd/ipfs/ipfs.go
+2
-2
config/config.go
config/config.go
+5
-5
No files found.
cmd/ipfs/init.go
View file @
4c167a42
...
...
@@ -136,9 +136,9 @@ func initCmd(c *commander.Command, inp []string) error {
}
// tracking ipfs version used to generate the init folder and adding update checker default setting.
cfg
.
Updates
=
config
.
Updates
{
cfg
.
Version
=
config
.
Version
{
Check
:
"error"
,
Version
:
currentVersion
.
String
(),
Current
:
currentVersion
.
String
(),
}
err
=
config
.
WriteConfigFile
(
filename
,
cfg
)
...
...
cmd/ipfs/ipfs.go
View file @
4c167a42
...
...
@@ -119,11 +119,11 @@ func localNode(confdir string, online bool) (*core.IpfsNode, error) {
return
nil
,
err
}
if
cfg
.
Updates
.
Check
!=
"ignore"
{
if
cfg
.
Version
.
Check
!=
"ignore"
{
obsolete
:=
checkForUpdates
()
if
obsolete
!=
nil
{
fmt
.
Println
(
obsolete
)
if
cfg
.
Updates
.
Check
==
"error"
{
if
cfg
.
Version
.
Check
==
"error"
{
return
nil
,
obsolete
}
}
...
...
config/config.go
View file @
4c167a42
...
...
@@ -45,10 +45,10 @@ func (bp *BootstrapPeer) String() string {
return
bp
.
Address
+
"/"
+
bp
.
PeerID
}
//
Updates
regulates checking
and downloading for application's
most recent version
type
Updates
struct
{
Check
string
`json:"check"`
// "ignore" for do not check, "warn" and "error" for reacting when obsolete
Version
string
`json:
"version
"`
// ipfs version for which config was generated
//
Version
regulates checking
if the
most recent version
is run
type
Version
struct
{
Check
string
`json:"check"`
// "ignore" for do not check, "warn" and "error" for reacting when obsolete
Current
string
`json:
"current
"`
// ipfs version for which config was generated
}
// Config is used to load IPFS config files.
...
...
@@ -57,7 +57,7 @@ type Config struct {
Datastore
Datastore
// local node's storage
Addresses
Addresses
// local node's addresses
Mounts
Mounts
// local node's mount points
Updates
Updates
// local node's version management
Version
Version
// local node's version management
Bootstrap
[]
*
BootstrapPeer
// local nodes's bootstrap peers
}
...
...
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