1
0
Fork 0
forked from External/ergo

Move all errors into errors.go

This commit is contained in:
Daniel Oaks 2018-02-03 22:03:36 +10:00
parent 3ef4c5f799
commit 2419f69879
17 changed files with 100 additions and 100 deletions

View file

@ -6,7 +6,6 @@
package irc
import (
"errors"
"fmt"
"strconv"
"time"
@ -18,10 +17,6 @@ import (
"github.com/oragono/oragono/irc/modes"
)
var (
ChannelAlreadyRegistered = errors.New("Channel is already registered")
)
// Channel represents a channel that clients can join.
type Channel struct {
flags modes.ModeSet
@ -132,7 +127,7 @@ func (channel *Channel) SetRegistered(founder string) error {
defer channel.stateMutex.Unlock()
if channel.registeredFounder != "" {
return ChannelAlreadyRegistered
return errChannelAlreadyRegistered
}
channel.registeredFounder = founder
channel.registeredTime = time.Now()