mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-09-19 21:33:56 +02:00
b6a95a8cb3
* Dropped unused codekit config * Integrated dynamic and static bindata for public * Ignore public bindata * Add a general generate make task * Integrated flexible public assets into web command * Updated vendoring, added all missiong govendor deps * Made the linter happy with the bindata and dynamic code * Moved public bindata definition to modules directory * Ignoring the new bindata path now * Updated to the new public modules import path * Updated public bindata command and drop the new prefix
32 lines
687 B
Go
32 lines
687 B
Go
// Copyright (c) 2012, Suryandaru Triandana <syndtr@gmail.com>
|
|
// All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
package leveldb
|
|
|
|
import (
|
|
"github.com/syndtr/goleveldb/leveldb/filter"
|
|
)
|
|
|
|
type iFilter struct {
|
|
filter.Filter
|
|
}
|
|
|
|
func (f iFilter) Contains(filter, key []byte) bool {
|
|
return f.Filter.Contains(filter, internalKey(key).ukey())
|
|
}
|
|
|
|
func (f iFilter) NewGenerator() filter.FilterGenerator {
|
|
return iFilterGenerator{f.Filter.NewGenerator()}
|
|
}
|
|
|
|
type iFilterGenerator struct {
|
|
filter.FilterGenerator
|
|
}
|
|
|
|
func (g iFilterGenerator) Add(key []byte) {
|
|
g.FilterGenerator.Add(internalKey(key).ukey())
|
|
}
|