Fix error()'s passing of variadic to Sprintf

This commit is contained in:
raylu 2010-10-13 14:43:07 -04:00
parent a5174d4b04
commit 82cc80ca1a
1 changed files with 3 additions and 1 deletions

View File

@ -113,7 +113,9 @@ func (conn *Conn) Connect(host string, pass string) os.Error {
}
// dispatch a nicely formatted os.Error to the error channel
func (conn *Conn) error(s string, a ...interface{}) { conn.Err <- os.NewError(fmt.Sprintf(s, a)) }
func (conn *Conn) error(s string, a ...interface{}) {
conn.Err <- os.NewError(fmt.Sprintf(s, a...))
}
// copied from http.client for great justice
func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") }