Skip to content

Commit

Permalink
Casting style change
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelkadolph committed Mar 10, 2013
1 parent 6d743e7 commit e966072
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion campfire/client.go
Expand Up @@ -59,7 +59,7 @@ func (c *Client) RoomByName(name string) (*Room, error) {
return nil, err
} else {
for _, r := range rooms {
if (string)(r.Name) == name {
if string(r.Name) == name {
return r, nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion campfire/connection.go
Expand Up @@ -136,7 +136,7 @@ func popHash(a []interface{}) ([]interface{}, hash) {
if len(a) > 0 {
l := len(a) - 1
if m, ok := a[l].(map[string]string); ok {
h = (hash)(m)
h = hash(m)
a = a[:l]
}
}
Expand Down
4 changes: 2 additions & 2 deletions campfire/room.go
Expand Up @@ -152,10 +152,10 @@ func (r *Room) message(b, t string) error {
Message Message `json:"message"`
}

wrapper.Message.Body = (n.String)(strings.Replace(b, "\n", "
", -1))
wrapper.Message.Body = n.String(strings.Replace(b, "\n", "
", -1))

if t != "" {
wrapper.Message.Type = (n.String)(t)
wrapper.Message.Type = n.String(t)
}

return r.connection.post("/room/%d/speak", r.ID, wrapper)
Expand Down

0 comments on commit e966072

Please sign in to comment.