From de1dae9799ff1ffef3f7cd56fa53a2ef19cdc4e2 Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Wed, 16 Mar 2022 10:09:43 -0700 Subject: [PATCH] Remove unnecessary debug output --- cap_test.go | 3 +-- client_test.go | 3 --- conn_test.go | 3 +-- constants.go | 2 +- ctcp.go | 2 -- example_test.go | 2 -- 6 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cap_test.go b/cap_test.go index b9e1139..aff9a2a 100644 --- a/cap_test.go +++ b/cap_test.go @@ -5,7 +5,6 @@ package girc import ( - "os" "reflect" "testing" ) @@ -17,7 +16,7 @@ func TestCapSupported(t *testing.T) { User: "user", SASL: &SASLPlain{User: "test", Pass: "example"}, SupportedCaps: map[string][]string{"example": nil}, - Debug: os.Stdout, + // Debug: os.Stdout, }) var ok bool diff --git a/client_test.go b/client_test.go index 4fef11f..a289d13 100644 --- a/client_test.go +++ b/client_test.go @@ -5,7 +5,6 @@ package girc import ( - "os" "strings" "testing" "time" @@ -18,7 +17,6 @@ func TestDisableTracking(t *testing.T) { Nick: "test", User: "test", Name: "Testing123", - Debug: os.Stdout, }) if client.Handlers.internal.len() < 1 { @@ -84,7 +82,6 @@ func TestClientLifetime(t *testing.T) { Nick: "test", User: "test", Name: "Testing123", - Debug: os.Stdout, }) tm := client.Lifetime() diff --git a/conn_test.go b/conn_test.go index e6a8a48..c7bbf21 100644 --- a/conn_test.go +++ b/conn_test.go @@ -8,7 +8,7 @@ import ( "bufio" "bytes" "net" - "os" + "sync/atomic" "testing" "time" @@ -101,7 +101,6 @@ func genMockConn() (client *Client, clientConn net.Conn, serverConn net.Conn) { Nick: "test", User: "test", Name: "Testing123", - Debug: os.Stdout, }) conn1, conn2 := net.Pipe() diff --git a/constants.go b/constants.go index 8526be5..447a4d0 100644 --- a/constants.go +++ b/constants.go @@ -152,7 +152,7 @@ const ( RPL_LISTEND = "323" RPL_UNIQOPIS = "325" RPL_CHANNELMODEIS = "324" - RPL_CREATIONTIME = "329" + RPL_CREATIONTIME = "329" RPL_NOTOPIC = "331" RPL_TOPIC = "332" RPL_INVITING = "341" diff --git a/ctcp.go b/ctcp.go index 2113aa5..fac7fd1 100644 --- a/ctcp.go +++ b/ctcp.go @@ -301,7 +301,6 @@ func handleCTCPSource(client *Client, ctcp CTCPEvent) { client.Cmd.SendCTCPReply(ctcp.Source.ID(), CTCP_SOURCE, "https://github.com/yunginnanet/girc-atomic") } - // handleCTCPTime replies with a RFC 1123 (Z) formatted version of Go's // local time. func handleCTCPTime(client *Client, ctcp CTCPEvent) { @@ -316,7 +315,6 @@ func handleCTCPFinger(client *Client, ctcp CTCPEvent) { return } - active := client.conn.lastActive.Load().(time.Time) client.Cmd.SendCTCPReply(ctcp.Source.ID(), CTCP_FINGER, fmt.Sprintf("%s -- idle %s", client.Config.Name, time.Since(active))) diff --git a/example_test.go b/example_test.go index 1223db6..7cab93d 100644 --- a/example_test.go +++ b/example_test.go @@ -35,7 +35,6 @@ func Example_bare() { Port: 6667, Nick: "test", User: "user", - Debug: os.Stdout, }) if err := client.Connect(); err != nil { @@ -52,7 +51,6 @@ func Example_simple() { Nick: "test", User: "user", Name: "Example bot", - Debug: os.Stdout, }) client.Handlers.Add(girc.CONNECTED, func(c *girc.Client, e girc.Event) {