From 2a3ff18d732b37c6f54c3e3d2d1f391b122eee2c Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Mon, 20 Dec 2010 22:14:22 +0000 Subject: [PATCH] Properly fix formatting. Bleh bleh bleh. --- client/connection.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client/connection.go b/client/connection.go index 4f874d4..5afe9f4 100644 --- a/client/connection.go +++ b/client/connection.go @@ -44,9 +44,7 @@ type Conn struct { Flood bool // Function which returns a *time.Time for use as a timestamp - // Format for *time.Time when outputting timestamps Timestamp func() *time.Time - Format string // Enable debugging? Set format for timestamps on debug output. Debug bool @@ -74,7 +72,7 @@ func New(nick, user, name string) *Conn { conn.SSLConfig = nil conn.Me = conn.NewNick(nick, user, name, "") conn.Timestamp = time.LocalTime - conn.Format = "15:04:05" + conn.TSFormat = "15:04:05" conn.setupEvents() return conn } @@ -196,7 +194,7 @@ func (conn *Conn) send() { } conn.io.Flush() if conn.Debug { - fmt.Println(conn.Timestamp().Format(conn.Format) + " -> " + line) + fmt.Println(conn.Timestamp().Format(conn.TSFormat) + " -> " + line) } } } @@ -213,7 +211,7 @@ func (conn *Conn) recv() { } s = strings.Trim(s, "\r\n") if conn.Debug { - fmt.Println(t.Format(conn.Format) + " <- " + s) + fmt.Println(t.Format(conn.TSFormat) + " <- " + s) } line := &Line{Raw: s, Time: t}