Refactor daemon.info to reduce cyclomatic complexity#37451
Merged
tiborvass merged 2 commits intomoby:masterfrom Jul 13, 2018
Merged
Refactor daemon.info to reduce cyclomatic complexity#37451tiborvass merged 2 commits intomoby:masterfrom
tiborvass merged 2 commits intomoby:masterfrom
Conversation
Before this change;
gocyclo daemon/info.go
17 daemon (*Daemon).SystemInfo daemon/info.go:27:1
2 daemon (*Daemon).SystemVersion daemon/info.go:150:1
1 daemon (*Daemon).showPluginsInfo daemon/info.go:195:1
After this change;
gocyclo daemon/info.go
8 daemon (*Daemon).fillSecurityOptions daemon/info.go:150:1
5 daemon operatingSystem daemon/info.go:201:1
3 daemon (*Daemon).fillDriverInfo daemon/info.go:121:1
2 daemon hostName daemon/info.go:172:1
2 daemon memInfo daemon/info.go:192:1
2 daemon kernelVersion daemon/info.go:182:1
1 daemon (*Daemon).SystemVersion daemon/info.go:81:1
1 daemon (*Daemon).SystemInfo daemon/info.go:27:1
1 daemon (*Daemon).fillPluginsInfo daemon/info.go:138:1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
ae09da6 to
c03d3a4
Compare
thaJeztah
commented
Jul 13, 2018
| } | ||
|
|
||
| func kernelVersion() string { | ||
| kernelVersion := "<unknown>" |
Member
Author
There was a problem hiding this comment.
FWIW; I don't like these <unknown> values; they should be in the CLI, not in the API, but that would need some discussion (for backward compatibility)
Codecov Report
@@ Coverage Diff @@
## master #37451 +/- ##
==========================================
- Coverage 34.95% 34.94% -0.01%
==========================================
Files 610 610
Lines 44875 44881 +6
==========================================
- Hits 15685 15683 -2
- Misses 27071 27077 +6
- Partials 2119 2121 +2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today's "Lunch time special!"
Before this change;
After this change;