From e966072b43054f69aae7ebcf68dc3a2d991612b9 Mon Sep 17 00:00:00 2001 From: Samuel Kadolph Date: Sun, 10 Mar 2013 18:08:39 -0400 Subject: [PATCH] Casting style change --- campfire/client.go | 2 +- campfire/connection.go | 2 +- campfire/room.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/campfire/client.go b/campfire/client.go index 0cf4817..58254dc 100644 --- a/campfire/client.go +++ b/campfire/client.go @@ -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 } } diff --git a/campfire/connection.go b/campfire/connection.go index 1fddea9..6b9fb0d 100644 --- a/campfire/connection.go +++ b/campfire/connection.go @@ -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] } } diff --git a/campfire/room.go b/campfire/room.go index da23b68..c9b0e84 100644 --- a/campfire/room.go +++ b/campfire/room.go @@ -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)