From ac86fb9530495de6b1664bb5783c98ab905b8cfb Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 31 Oct 2016 20:49:40 -0700 Subject: [PATCH] Fix return statement inside else block at the end of function and gofmt windows file Signed-off-by: nick --- bolt_windows.go | 2 +- bucket.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bolt_windows.go b/bolt_windows.go index d538e6a..b00fb07 100644 --- a/bolt_windows.go +++ b/bolt_windows.go @@ -89,7 +89,7 @@ func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) erro func funlock(db *DB) error { err := unlockFileEx(syscall.Handle(db.lockfile.Fd()), 0, 1, 0, &syscall.Overlapped{}) db.lockfile.Close() - os.Remove(db.path+lockExt) + os.Remove(db.path + lockExt) return err } diff --git a/bucket.go b/bucket.go index 511ce72..0c5bf27 100644 --- a/bucket.go +++ b/bucket.go @@ -175,9 +175,8 @@ func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) { if bytes.Equal(key, k) { if (flags & bucketLeafFlag) != 0 { return nil, ErrBucketExists - } else { - return nil, ErrIncompatibleValue } + return nil, ErrIncompatibleValue } // Create empty, inline bucket.