Run gofmt, since it's clearly been a while.

This commit is contained in:
Alex Bramley 2013-02-16 10:33:15 +00:00
parent a674267128
commit f27e56c8b0
9 changed files with 51 additions and 49 deletions

View File

@ -1,11 +1,11 @@
package main
import (
irc "github.com/fluffle/goirc/client"
"bufio"
"flag"
"fmt"
irc "github.com/fluffle/goirc/client"
"os"
"bufio"
"strings"
)

View File

@ -3,8 +3,8 @@ package client
import (
"bufio"
"code.google.com/p/gomock/gomock"
"github.com/fluffle/golog/logging"
"github.com/fluffle/goirc/state"
"github.com/fluffle/golog/logging"
"strings"
"testing"
"time"
@ -470,7 +470,7 @@ func TestRateLimit(t *testing.T) {
// We'll be needing this later...
abs := func(i time.Duration) time.Duration {
if (i < 0) {
if i < 0 {
return -i
}
return i

View File

@ -105,7 +105,9 @@ func (hs *hSet) dispatch(conn *Conn, line *Line) {
defer hs.RUnlock()
ev := strings.ToLower(line.Cmd)
list, ok := hs.set[ev]
if !ok { return }
if !ok {
return
}
for hn := list.start; hn != nil; hn = hn.next {
go hn.Handle(conn, line)
}

View File

@ -99,7 +99,9 @@ func (conn *Conn) h_PRIVMSG(line *Line) {
}
}
cmd, l := conn.cmdMatch(txt)
if cmd == nil { return }
if cmd == nil {
return
}
if conn.CommandStripPrefix {
txt = strings.TrimSpace(txt[l:])
}

View File

@ -188,7 +188,6 @@ func TestPRIVMSG(t *testing.T){
c.h_PRIVMSG(parseLine(":blah!moo@cows.com PRIVMSG #foo :test! prefix bar"))
s.nc.ExpectNothing()
}
// Test the handler for JOIN messages
@ -317,7 +316,6 @@ func TestMODE(t *testing.T) {
t.Errorf("Channel.ParseModes() not called correctly.")
}
// Send a nick mode line, returning Me
gomock.InOrder(
s.st.EXPECT().GetChannel("test").Return(nil),