/pingpong

This package provides handlers for API continuity confirmation.

Primary LanguageGoMIT LicenseMIT

PingPong handler

Build Status

pingpong is a package for Go. This package provides handlers(pingpong.Handler, pingpong.HandlerJSON) for API continuity confirmation.

Example

package main

import (
	"net/http"

	"github.com/fillin-inc/pingpong"
)

func main() {
	http.HandleFunc("/ping", pingpong.Handler) // return text/plain
	http.HandleFunc("/ping-json", pingpong.HandlerJSON) // return application/json
	http.ListenAndServe(":8080", nil)
}

License

MIT License. See LICENSE file.