kunt

golang IRC bot
git clone git://git.2f30.org/kunt
Log | Files | Refs | LICENSE

commit 7025ddc9168304030392a994cf094378f0458c6c
parent 7df47eeb5c09223759fa1f68c5200f503fed0ec8
Author: sin <sin@2f30.org>
Date:   Sun, 28 Apr 2013 16:05:44 +0100

mapfs: No need to use package errors, just use fmt.Errorf()

Diffstat:
Msrc/mapfs/mapfs.go | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mapfs/mapfs.go b/src/mapfs/mapfs.go @@ -2,7 +2,6 @@ package mapfs import ( - "errors" "fmt" "io/ioutil" "math/rand" @@ -194,7 +193,7 @@ func (m *Mapfs) Get(key int) ([]byte, error) { m.lock.Lock() defer m.lock.Unlock() if len(m.dict) == 0 { - return nil, errors.New("Empty map, can't fetch entry") + return nil, fmt.Errorf("Empty map, can't fetch entry") } val, ok := m.dict[key] if !ok {