Skip to content

Commit 214c032

Browse files
sko00ounknwon
authored andcommitted
Fix example (go-macaron#1)
1 parent 9f87abe commit 214c032

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example/chat.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,17 @@ func main() {
112112
chat = newChat()
113113

114114
// Index
115-
m.Get("/", func(ctx *macaron.Context) {
115+
m.Get("/", func(c *macaron.Context) {
116116
c.HTML(200, "index", "")
117117
})
118118

119119
// render the room
120-
m.Get("/rooms/:name", func(ctx *macaron.Context) {
120+
m.Get("/rooms/:name", func(c *macaron.Context) {
121121
c.HTML(200, "room", map[string]map[string]string{"room": map[string]string{"name": c.Params(":name")}})
122122
})
123123

124124
// This is the sockets connection for the room, it is a json mapping to sockets.
125-
m.Get("/sockets/rooms/:name/:clientname", sockets.JSON(Message{}), func(ctx *macaron.Context, receiver <-chan *Message, sender chan<- *Message, done <-chan bool, disconnect chan<- int, err <-chan error) (int, string) {
125+
m.Get("/sockets/rooms/:name/:clientname", sockets.JSON(Message{}), func(c *macaron.Context, receiver <-chan *Message, sender chan<- *Message, done <-chan bool, disconnect chan<- int, err <-chan error) (int, string) {
126126
client := &Client{c.Params("clientname"), receiver, sender, done, err, disconnect}
127127
r := chat.getRoom(c.Params("name"))
128128
r.appendClient(client)

example/public/application.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ var RoomForm = function() {
136136
}
137137

138138
var initialize = function() {
139-
r.create().handleForm().handleAway();
139+
r.create().handleForm();
140140
}();
141141
}
142142

0 commit comments

Comments
 (0)