Permalink
Browse files

gofmt

  • Loading branch information...
1 parent 6b23935 commit 2dcca33a2528512af47ba8b4aca4de648295300e @nf committed Oct 12, 2010
Showing with 6 additions and 9 deletions.
  1. +1 −2 go/main.go
  2. +3 −3 go/message.go
  3. +0 −1 go/muxer.go
  4. +2 −3 go/sock.go
View
@@ -7,7 +7,7 @@ import (
const (
httpListen = ":8080"
- staticDir = "../public"
+ staticDir = "../public"
)
func StaticHandler(w http.ResponseWriter, r *http.Request) {
@@ -24,4 +24,3 @@ func main() {
http.HandleFunc("/", StaticHandler)
http.ListenAndServe(httpListen, nil)
}
-
View
@@ -1,13 +1,13 @@
package main
type Update struct {
- Id int
- Name string
+ Id int
+ Name string
X, Y, Angle, Momentum float
}
type Message struct {
- Id int
+ Id int
Message string
}
View
@@ -46,4 +46,3 @@ func Muxer() {
}
}
}
-
View
@@ -14,7 +14,7 @@ var SockHandler = websocket.Handler(SockServer)
func SockServer(ws *websocket.Conn) {
// create and send channel to muxer
ch := make(MessageChannel)
- Incoming <- ch
+ Incoming <- ch
// get id from muxer
id, ok := (<-ch).(int)
if !ok {
@@ -29,7 +29,7 @@ func SockServer(ws *websocket.Conn) {
}
type inMsg struct {
- Update *Update
+ Update *Update
Message *Message
}
@@ -67,4 +67,3 @@ func writeMessages(w io.Writer, ch chan interface{}) {
})
}
}
-

0 comments on commit 2dcca33

Please sign in to comment.