func (s *State) serveRead(w http.ResponseWriter, r *http.Request) {
	s.lock.Lock()
	defer s.lock.Unlock()
	w.WriteHeader(http.StatusOK)
	b, err := json.MarshalIndent(s, "", "\t")
	s.appendErr(err)
	_, err = w.Write(b)
	s.appendErr(err)
}
// serveRead writes our json encoded state
serveRead writes our json encoded state
// serveRead writes our json encoded state
func (s *State) serveRead(w http.ResponseWriter, r *http.Request) {
	s.lock.Lock()
	defer s.lock.Unlock()
	w.WriteHeader(http.StatusOK)
	b, err := json.MarshalIndent(s, "", "\t")
	s.appendErr(err)
	_, err = w.Write(b)
	s.appendErr(err)
}
func ( s * State ) serveRead ( w http . ResponseWriter , r * http . Request ) { s . lock . Lock ( ) defer s . lock . Unlock ( ) w . WriteHeader ( http . StatusOK ) b , err := json . MarshalIndent ( s , " " , " \t " ) s . appendErr ( err ) _ , err = w . Write ( b ) s . appendErr ( err ) }
serveRead writes our json encoded state
serveRead writes our json encoded state