Files
podinfo/pkg/api/version.go
2018-08-20 11:23:13 +03:00

16 lines
289 B
Go

package api
import (
"net/http"
"github.com/stefanprodan/k8s-podinfo/pkg/version"
)
func (s *Server) versionHandler(w http.ResponseWriter, r *http.Request) {
result := map[string]string{
"version": version.VERSION,
"commit": version.REVISION,
}
s.JSONResponse(w, r, result)
}