From 98424443a81ae3443ed3c44b7c5526e285568929 Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Mon, 21 Mar 2022 17:12:47 -0700 Subject: [PATCH] Lint + version bump --- state_test.go | 21 ++++++++++----------- version.go | 3 ++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/state_test.go b/state_test.go index 3d20963..eafc464 100644 --- a/state_test.go +++ b/state_test.go @@ -78,17 +78,16 @@ func TestState(t *testing.T) { if network := c.NetworkName(); network != "DummyIRC" && network != "DUMMY" { t.Errorf("User.Network == %q, want \"DummyIRC\" or \"DUMMY\"", network) return - } else { - t.Logf("successfully tested network name: %s", network) } + t.Logf("successfully tested network name: %s", network) + if caseExample, ok := c.GetServerOpt("NICKLEN"); !ok || caseExample != "20" { t.Errorf("Client.GetServerOptions returned invalid ISUPPORT variable: %q", caseExample) - return - } else { - t.Logf("successfully serveroption NICKLEN: %s", caseExample) } + t.Logf("successfully serveroption NICKLEN: %s", caseExample) + users := c.UserList() channels := c.ChannelList() @@ -96,26 +95,26 @@ func TestState(t *testing.T) { // This could fail too, if sorting isn't occurring. t.Errorf("got state users %#v, wanted: %#v", users, []string{"fhjones", "nick2"}) return - } else { - t.Logf("successfully checked userlist: %v", users) } + t.Logf("successfully checked userlist: %v", users) + if !reflect.DeepEqual(channels, []string{"#channel", "#channel2"}) { // This could fail too, if sorting isn't occurring. t.Errorf("got state channels %#v, wanted: %#v", channels, []string{"#channel", "#channel2"}) return - } else { - t.Logf("successfully checked channel list: %v", channels) } + t.Logf("successfully checked channel list: %v", channels) + fullChannels := c.Channels() for i := 0; i < len(fullChannels); i++ { if fullChannels[i].Name != channels[i] { t.Errorf("fullChannels name doesn't map to same name in ChannelsList: %q :: %#v", fullChannels[i].Name, channels) return - } else { - t.Logf("successfully checked full channel list: %s: %v", fullChannels[i].Name, channels) } + + t.Logf("successfully checked full channel list: %s: %v", fullChannels[i].Name, channels) } fullUsers := c.Users() diff --git a/version.go b/version.go index 635f094..f0b2808 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,4 @@ package girc -const Version = "v0.5.1" +// Version represents the current library version of girc-atomic. +const Version = "v0.5.2"