Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (15 sloc) 322 Bytes
package patrol
import (
"encoding/json"
"net/http"
)
func (self *Patrol) ServeHTTPStatus(
w http.ResponseWriter,
r *http.Request,
) {
w.Header().Set("Content-Type", "application/json; charset=utf-8")
bs, _ := json.MarshalIndent(self.GetStatus(), "", "\t")
w.WriteHeader(200)
w.Write(bs)
w.Write([]byte("\n"))
}
You can’t perform that action at this time.