X-Git-Url: http://git.scottworley.com/reliable-chat/blobdiff_plain/842eacb46d084f3b694c42afe22db6d7a3afc3b7..9b33d8539f2c58d46adfc676bf2a1769af221dfd:/server/server.go?ds=sidebyside diff --git a/server/server.go b/server/server.go index f9c4857..8d4e897 100644 --- a/server/server.go +++ b/server/server.go @@ -11,11 +11,6 @@ type Message struct { Text string } -type FetchResponse struct { - Messages []Message - Time time.Time -} - type StoreRequest struct { StartTime time.Time Messages chan<- []Message @@ -94,7 +89,7 @@ func start_server(store Store) { messages_from_store := make(chan []Message, 1) store.Get <- StoreRequest{since, messages_from_store} - json_encoded, err := json.Marshal(FetchResponse{<-messages_from_store, time.Now()}) + json_encoded, err := json.Marshal(<-messages_from_store) if err != nil { log.Print("json encode: ", err) w.WriteHeader(http.StatusInternalServerError)