mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-19 19:13:25 +02:00
* 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
41 lines
796 B
Go
41 lines
796 B
Go
package hbase
|
|
|
|
import "bytes"
|
|
|
|
type Type byte
|
|
|
|
const (
|
|
TypeMinimum = Type(0)
|
|
TypePut = Type(4)
|
|
TypeDelete = Type(8)
|
|
TypeDeleteFamilyVersion = Type(10)
|
|
TypeDeleteColumn = Type(12)
|
|
TypeDeleteFamily = Type(14)
|
|
TypeMaximum = Type(0xff)
|
|
)
|
|
|
|
type set map[string]struct{}
|
|
|
|
func newSet() set {
|
|
return set(map[string]struct{}{})
|
|
}
|
|
|
|
func (s set) exists(k string) bool {
|
|
_, ok := s[k]
|
|
return ok
|
|
}
|
|
|
|
func (s set) add(k string) {
|
|
s[k] = struct{}{}
|
|
}
|
|
|
|
func (s set) remove(k string) {
|
|
delete(s, k)
|
|
}
|
|
|
|
type BytesSlice [][]byte
|
|
|
|
func (s BytesSlice) Len() int { return len(s) }
|
|
func (s BytesSlice) Less(i, j int) bool { return bytes.Compare(s[i], s[j]) < 0 }
|
|
func (s BytesSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
|