feat: add default reply to get on / and health check on /healthz
This commit is contained in:
7
gecho.go
7
gecho.go
@ -5,8 +5,15 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func ok(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Test", "test")
|
||||
fmt.Fprint(w, strings.Join(r.Header.Values("X-Request-Id"), ","))
|
||||
|
||||
}
|
||||
|
||||
// handler generates the echo server response
|
||||
func handler(l int) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
Reference in New Issue
Block a user