Skip to content

Commit ac86fb9

Browse files
author
nick
committed
Fix return statement inside else block at the end of function and gofmt windows file
Signed-off-by: nick <[email protected]>
1 parent 4b1ebc1 commit ac86fb9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

bolt_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) erro
8989
func funlock(db *DB) error {
9090
err := unlockFileEx(syscall.Handle(db.lockfile.Fd()), 0, 1, 0, &syscall.Overlapped{})
9191
db.lockfile.Close()
92-
os.Remove(db.path+lockExt)
92+
os.Remove(db.path + lockExt)
9393
return err
9494
}
9595

bucket.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,8 @@ func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) {
175175
if bytes.Equal(key, k) {
176176
if (flags & bucketLeafFlag) != 0 {
177177
return nil, ErrBucketExists
178-
} else {
179-
return nil, ErrIncompatibleValue
180178
}
179+
return nil, ErrIncompatibleValue
181180
}
182181

183182
// Create empty, inline bucket.

0 commit comments

Comments
 (0)