Skip to content

epomatti/gin-ping

Repository files navigation

GinPing

Build codecov

GinPing is a small middleware library for Gin to add health check routes.

Quick start

To enable a default /health route:

ginping.Add(r)

Example:

package main

import (
  "github.com/epomatti/gin-ping"
  "github.com/gin-gonic/gin"
)

func main() {
  r := gin.Default()
  ginping.Add(r)
  r.Run()
}

Testing locally with curl localhost:8080/health should return the response OK.