Skip to content

All branches of if-then-elseif construction are identical #6030

Open
@chavacava

Description

@chavacava

Every branch of the following if-then-elseif construction do the same (_, err = impl.dbConnection.Query(&appStoreWithVersion, query, queryParams...)

if len(filter.ChartRepoId) > 0 && len(filter.RegistryId) > 0 {
_, err = impl.dbConnection.Query(&appStoreWithVersion, query, queryParams...)
} else if len(filter.RegistryId) > 0 {
_, err = impl.dbConnection.Query(&appStoreWithVersion, query, queryParams...)
} else if len(filter.ChartRepoId) > 0 {
_, err = impl.dbConnection.Query(&appStoreWithVersion, query, queryParams...)
} else {
_, err = impl.dbConnection.Query(&appStoreWithVersion, query, queryParams...)
}

Found with revive

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions