Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
go-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai3
go-common
Commits
6916834d
Commit
6916834d
authored
6 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Fix two lint warnings
parent
4a10e54f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
serverutil/http.go
+4
-3
4 additions, 3 deletions
serverutil/http.go
with
4 additions
and
3 deletions
serverutil/http.go
+
4
−
3
View file @
6916834d
...
...
@@ -115,8 +115,9 @@ func Serve(h http.Handler, config *ServerConfig, addr string) error {
signal
.
Notify
(
sigCh
,
syscall
.
SIGINT
,
syscall
.
SIGTERM
)
// Notify systemd that we are ready to serve.
daemon
.
SdNotify
(
false
,
"READY=1"
)
// Notify systemd that we are ready to serve. This call is
// allowed to fail (in case there is no systemd).
daemon
.
SdNotify
(
false
,
"READY=1"
)
// nolint
err
=
srv
.
Serve
(
l
)
if
err
!=
http
.
ErrServerClosed
{
...
...
@@ -132,7 +133,7 @@ func defaultHandler(h http.Handler) http.Handler {
// Add an endpoint for HTTP health checking probes.
root
.
Handle
(
"/health"
,
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
_
*
http
.
Request
)
{
io
.
WriteString
(
w
,
"OK"
)
io
.
WriteString
(
w
,
"OK"
)
// nolint
}))
// Add an endpoint to serve Prometheus metrics.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment