Fixed formatting with go fmt

This commit is contained in:
kyle 2014-12-20 16:56:58 +02:00
parent 39a7da0a37
commit c8beed09da
1 changed files with 7 additions and 7 deletions

View File

@ -23,8 +23,8 @@ type Conn struct {
// Handlers // Handlers
intHandlers *hSet intHandlers *hSet
fgHandlers *hSet fgHandlers *hSet
bgHandlers *hSet bgHandlers *hSet
// State tracker for nicks and channels // State tracker for nicks and channels
st state.Tracker st state.Tracker
@ -91,7 +91,7 @@ func NewConfig(nick string, args ...string) *Config {
NewNick: func(s string) string { return s + "_" }, NewNick: func(s string) string { return s + "_" },
Recover: (*Conn).LogPanic, // in dispatch.go Recover: (*Conn).LogPanic, // in dispatch.go
SplitLen: 450, SplitLen: 450,
Timeout: 60, Timeout: 60,
} }
cfg.Me.Ident = "goirc" cfg.Me.Ident = "goirc"
if len(args) > 0 && args[0] != "" { if len(args) > 0 && args[0] != "" {
@ -211,13 +211,13 @@ func (conn *Conn) Connect() error {
if !hasPort(conn.cfg.Server) { if !hasPort(conn.cfg.Server) {
conn.cfg.Server += ":6697" conn.cfg.Server += ":6697"
} }
if &conn.cfg.Timeout != nil{ if &conn.cfg.Timeout != nil {
conn.cfg.Timeout = (60 * time.Second) conn.cfg.Timeout = (60 * time.Second)
} }
logging.Info("irc.Connect(): Connecting to %s with SSL.", conn.cfg.Server) logging.Info("irc.Connect(): Connecting to %s with SSL.", conn.cfg.Server)
dialer := &net.Dialer{ dialer := &net.Dialer{
Timeout : conn.cfg.Timeout, Timeout: conn.cfg.Timeout,
} }
if s, err := tls.DialWithDialer(dialer, "tcp", conn.cfg.Server, conn.cfg.SSLConfig); err == nil { if s, err := tls.DialWithDialer(dialer, "tcp", conn.cfg.Server, conn.cfg.SSLConfig); err == nil {
conn.sock = s conn.sock = s
} else { } else {
@ -227,7 +227,7 @@ func (conn *Conn) Connect() error {
if !hasPort(conn.cfg.Server) { if !hasPort(conn.cfg.Server) {
conn.cfg.Server += ":6667" conn.cfg.Server += ":6667"
} }
if &conn.cfg.Timeout != nil{ if &conn.cfg.Timeout != nil {
conn.cfg.Timeout = (60 * time.Second) conn.cfg.Timeout = (60 * time.Second)
} }
logging.Info("irc.Connect(): Connecting to %s without SSL.", conn.cfg.Server) logging.Info("irc.Connect(): Connecting to %s without SSL.", conn.cfg.Server)