mirror of
https://github.com/fluffle/goirc
synced 2025-07-10 23:39:23 +00:00
Re-work Handlers for IRC events; add Commands.
This commit is contained in:
parent
a038856094
commit
a674267128
8 changed files with 692 additions and 158 deletions
|
@ -74,7 +74,7 @@ func (m *mockNetConn) Send(s string) {
|
|||
|
||||
func (m *mockNetConn) Expect(e string) {
|
||||
select {
|
||||
case <-time.After(1e6):
|
||||
case <-time.After(time.Millisecond):
|
||||
m.Errorf("Mock connection did not receive expected output.\n\t"+
|
||||
"Expected: '%s', got nothing.", e)
|
||||
case s := <-m.Out:
|
||||
|
@ -88,7 +88,7 @@ func (m *mockNetConn) Expect(e string) {
|
|||
|
||||
func (m *mockNetConn) ExpectNothing() {
|
||||
select {
|
||||
case <-time.After(1e6):
|
||||
case <-time.After(time.Millisecond):
|
||||
case s := <-m.Out:
|
||||
s = strings.Trim(s, "\r\n")
|
||||
m.Errorf("Mock connection received unexpected output.\n\t"+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue