Skip to content

Commit

Permalink
route health handler path correctly (#474)
Browse files Browse the repository at this point in the history
* fix health handler
  • Loading branch information
Yutong Pei committed Jan 24, 2019
1 parent 0631cdd commit 9ef1c60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
echo "" > coverage.txt

for d in $(go list ./... | grep -v vendor); do
go test -short -coverprofile=profile.out -covermode=count "$d"
go test -short -v -coverprofile=profile.out -covermode=count "$d"
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
Expand Down
4 changes: 2 additions & 2 deletions server/itx/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ package itx
import "net/http"

func registerHealthCheckMux(root *http.ServeMux) {
root.Handle("/health/", http.StripPrefix("/health", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
root.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("OK"))
})))
})
}

0 comments on commit 9ef1c60

Please sign in to comment.