Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

Commit 2c3edd7

Browse files
authored
Merge pull request boltdb#616 from sinwav/idiomatic
Fix return statement inside else block at the end of function
2 parents ebe3101 + ac86fb9 commit 2c3edd7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

bolt_windows.go

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 2 deletions
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)