mirror of https://github.com/fluffle/goirc
Fix error()'s passing of variadic to Sprintf
This commit is contained in:
parent
a5174d4b04
commit
82cc80ca1a
|
@ -113,7 +113,9 @@ func (conn *Conn) Connect(host string, pass string) os.Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// dispatch a nicely formatted os.Error to the error channel
|
// 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
|
// copied from http.client for great justice
|
||||||
func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") }
|
func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") }
|
||||||
|
|
Loading…
Reference in New Issue