diff --git a/core/search/tree.go b/core/search/tree.go index 0bcb3322..3779f790 100644 --- a/core/search/tree.go +++ b/core/search/tree.go @@ -143,11 +143,11 @@ func add(nd *node, route string, item interface{}) error { } return ErrInvalidState - } else { - child := newNode(nil) - children[token] = child - return add(child, route[i+1:], item) } + + child := newNode(nil) + children[token] = child + return add(child, route[i+1:], item) } } diff --git a/tools/goctl/model/sql/test/orm.go b/tools/goctl/model/sql/test/orm.go index 6cb35a7e..26729993 100644 --- a/tools/goctl/model/sql/test/orm.go +++ b/tools/goctl/model/sql/test/orm.go @@ -217,18 +217,18 @@ func unmarshalRows(v interface{}, scanner rowsScanner, strict bool) error { if err := scanner.Scan(values...); err != nil { return err - } else { - appendFn(value) } + + appendFn(value) } default: return ErrUnsupportedValueType } return nil - } else { - return ErrNotSettable } + + return ErrNotSettable default: return ErrUnsupportedValueType }