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
ee8bcd55
Commit
ee8bcd55
authored
Oct 18, 2014
by
Henry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added AutoUpdate to config
parent
2806260f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
config/version.go
config/version.go
+15
-0
No files found.
config/version.go
View file @
ee8bcd55
...
...
@@ -22,6 +22,13 @@ type Version struct {
// CheckPeriod is the time duration over which the update check will not be performed
// (Note: cannot use time.Duration because marshalling with json breaks it)
CheckPeriod
string
// AutoUpdate is optional and has these these options:
// - "never" do not auto-update
// - "patch" auto-update on new patch versions
// - "minor" auto-update on new minor (or patch) versions (Default)
// - "major" auto-update on any new version
AutoUpdate
string
}
// supported Version.Check values
...
...
@@ -36,6 +43,14 @@ const (
CheckIgnore
=
"ignore"
)
// supported Version.AutoUpdate values
const
(
UpdateNever
=
"never"
UpdatePatch
=
"patch"
UpdateMinor
=
"minor"
UpdateMajor
=
"major"
)
// defaultCheckPeriod governs h
var
defaultCheckPeriod
=
time
.
Hour
*
48
...
...
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