johnsonjh / jleveldb

jleveldb: JLevelDB is an implementation of the LevelDB key/value database in the Go programming language, based on GoLevelDB

Home Page:https://github.com/johnsonjh/jleveldb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(CRT-A0011) Nested if can be replaced with else-if

johnsonjh opened this issue · comments

Description

It's better to have as little nesting as possible. Hence, it's cleaner to replace a single nested if inside an else with an else-if. For example: go if cond1 { // do something } else { if x := cond2; x { // do something else } } can …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/jleveldb/issue/CRT-A0011/occurrences/

⚠️ This has been marked to be closed in 7 days.