this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:art: go fmt

+3 -4
+3 -4
pubsub.go
··· 28 28 case <-clientGone: 29 29 fmt.Println("Client disconnected") 30 30 return 31 - case data := <- p.channel: 31 + case data := <-p.channel: 32 32 _, err := fmt.Fprintf(w, "data: %s\n", data) 33 33 if err != nil { 34 34 return ··· 42 42 } 43 43 44 44 type Input struct { 45 - Value uint `json:"value"` 46 - Name string `json:"name"` 45 + Value uint `json:"value"` 46 + Name string `json:"name"` 47 47 } 48 48 49 49 func (p *PubSub) HandlePublish(w http.ResponseWriter, r *http.Request) { ··· 59 59 w.WriteHeader(http.StatusOK) 60 60 w.Write([]byte("Message received")) 61 61 } 62 -