mirror of
https://github.com/fluffle/goirc
synced 2025-05-12 18:44:50 +00:00
gofix run
This commit is contained in:
parent
83b482f8ce
commit
5027646478
2 changed files with 24 additions and 24 deletions
|
@ -50,7 +50,7 @@ type Conn struct {
|
|||
Timestamp func() *time.Time
|
||||
|
||||
// Enable debugging? Set format for timestamps on debug output.
|
||||
Debug bool
|
||||
Debug bool
|
||||
TSFormat string
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ func (conn *Conn) Connect(host string, pass ...string) os.Error {
|
|||
// It's unfortunate that tls.Dial doesn't allow a tls.Config arg,
|
||||
// so we simply replicate it here with the correct Config.
|
||||
// http://codereview.appspot.com/2883041
|
||||
if s, err := net.Dial("tcp", "", host); err == nil {
|
||||
if s, err := net.Dial("tcp", host); err == nil {
|
||||
// Passing nil config => certs are validated.
|
||||
c := tls.Client(s, conn.SSLConfig)
|
||||
if err = c.Handshake(); err == nil {
|
||||
|
@ -133,7 +133,7 @@ func (conn *Conn) Connect(host string, pass ...string) os.Error {
|
|||
if !hasPort(host) {
|
||||
host += ":6667"
|
||||
}
|
||||
if s, err := net.Dial("tcp", "", host); err == nil {
|
||||
if s, err := net.Dial("tcp", host); err == nil {
|
||||
conn.sock = s
|
||||
} else {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue