Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aksel Baardsen
Assignment 1
Commits
02913859
Commit
02913859
authored
Oct 19, 2019
by
Aksel Baardsen
Browse files
removed one-liner function getVersion and implemented inline instead
parent
34eae9b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
pkg/diag.go
View file @
02913859
...
...
@@ -30,7 +30,7 @@ func GetDiag(d* Diag) error {
return
fmt
.
Errorf
(
"error occured while contacting Restcountries API: %s"
,
err
)
}
get
Version
(
d
)
d
.
Version
=
"v1"
getUptime
(
d
)
return
nil
...
...
@@ -54,10 +54,6 @@ func getRestStatus(d *Diag) error {
return
nil
}
func
getVersion
(
d
*
Diag
)
{
d
.
Version
=
"v1"
}
// Returns application uptime in seconds
func
getUptime
(
d
*
Diag
)
{
up
:=
time
.
Since
(
startTime
)
.
Seconds
()
...
...
Write
Preview
Supports
Markdown
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