Clean up database/query package

This commit is contained in:
Daniel 2019-09-20 22:01:17 +02:00
parent ac6d9db456
commit 60dea8092f
7 changed files with 37 additions and 39 deletions

View file

@ -96,10 +96,7 @@ func (q *Query) IsChecked() bool {
// MatchesKey checks whether the query matches the supplied database key (key without database prefix).
func (q *Query) MatchesKey(dbKey string) bool {
if !strings.HasPrefix(dbKey, q.dbKeyPrefix) {
return false
}
return true
return strings.HasPrefix(dbKey, q.dbKeyPrefix)
}
// MatchesRecord checks whether the query matches the supplied database record (value only).