zrok/endpoints/publicFrontend/healthUi/handler.go

22 lines
356 B
Go
Raw Normal View History

2022-12-14 20:41:54 +01:00
package healthUi
2022-09-07 18:22:22 +02:00
import (
"github.com/sirupsen/logrus"
"net/http"
)
func WriteHealthOk(w http.ResponseWriter) {
if data, err := FS.ReadFile("index.html"); err == nil {
w.WriteHeader(http.StatusOK)
n, err := w.Write(data)
if n != len(data) {
logrus.Errorf("short write")
return
}
if err != nil {
logrus.Error(err)
return
}
}
}