github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/web/conncheck/conncheck.go (about) 1 // Package conncheck returns HTTP 204 No Content for connectivity check 2 package conncheck 3 4 import ( 5 "net/http" 6 7 "github.com/labstack/echo/v4" 8 ) 9 10 // NoContent responds with HTTP 204 No Content 11 func NoContent(c echo.Context) error { 12 return c.NoContent(http.StatusNoContent) 13 } 14 15 // Routes sets the routing for the conncheck service 16 func Routes(router *echo.Group) { 17 router.GET("", NoContent) 18 router.HEAD("", NoContent) 19 }