Merge pull request #1432 from jaffee/deadcode

Deadcode
This commit is contained in:
Matthew Jaffee 2018-07-02 06:51:06 -05:00 committed by GitHub
commit b57304ebae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 76 deletions

37
attr.go
View file

@ -233,44 +233,19 @@ type memAttrStore struct {
store map[uint64]map[string]interface{}
}
// Path is an in-memory implementation of AttrStore Path method.
func (s *memAttrStore) Path() string { return "" }
// Open is an in-memory implementation of AttrStore Open method.
func (s *memAttrStore) Open() error {
return nil
}
// Close is an in-memory implementation of AttrStore Close method.
func (s *memAttrStore) Close() error {
return nil
}
// Attrs returns a set of attributes by ID.
func (s *memAttrStore) Attrs(id uint64) (m map[string]interface{}, err error) {
return s.store[id], nil
}
// SetAttrs sets attribute values for a given ID.
func (s *memAttrStore) Path() string { return "" }
func (s *memAttrStore) Open() error { return nil }
func (s *memAttrStore) Close() error { return nil }
func (s *memAttrStore) Attrs(id uint64) (m map[string]interface{}, err error) { return s.store[id], nil }
func (s *memAttrStore) SetAttrs(id uint64, m map[string]interface{}) error {
s.store[id] = m
return nil
}
// SetBulkAttrs sets attribute values for a set of ids.
func (s *memAttrStore) SetBulkAttrs(m map[uint64]map[string]interface{}) error {
for id, v := range m {
s.store[id] = v
}
return nil
}
// Blocks is an in-memory implementation of AttrStore Blocks method.
func (s *memAttrStore) Blocks() ([]AttrBlock, error) {
return nil, nil
}
// BlockData is an in-memory implementation of AttrStore BlockData method.
func (s *memAttrStore) BlockData(i uint64) (map[uint64]map[string]interface{}, error) {
return nil, nil
}
func (s *memAttrStore) Blocks() ([]AttrBlock, error) { return nil, nil }
func (s *memAttrStore) BlockData(i uint64) (map[uint64]map[string]interface{}, error) { return nil, nil }

View file

@ -1297,43 +1297,6 @@ func (b *bsiGroup) validate() error {
return nil
}
func encodeBSIGroup(b *bsiGroup) *internal.BSIGroup {
if b == nil {
return nil
}
return &internal.BSIGroup{
Name: b.Name,
Type: b.Type,
Min: int64(b.Min),
Max: int64(b.Max),
}
}
func decodeBSIGroup(b *internal.BSIGroup) *bsiGroup {
if b == nil {
return nil
}
return &bsiGroup{
Name: b.Name,
Type: b.Type,
Min: b.Min,
Max: b.Max,
}
}
// importBitSet represents slices of row and column ids.
// This is used to sort data during import.
type importBitSet struct {
rowIDs, columnIDs []uint64
}
func (p importBitSet) Swap(i, j int) {
p.rowIDs[i], p.rowIDs[j] = p.rowIDs[j], p.rowIDs[i]
p.columnIDs[i], p.columnIDs[j] = p.columnIDs[j], p.columnIDs[i]
}
func (p importBitSet) Len() int { return len(p.rowIDs) }
func (p importBitSet) Less(i, j int) bool { return p.rowIDs[i] < p.rowIDs[j] }
// Cache types.
const (
CacheTypeLRU = "lru"

View file

@ -5,7 +5,6 @@ import (
"bytes"
"context"
"encoding/binary"
"encoding/hex"
"errors"
"fmt"
"io"
@ -1002,5 +1001,3 @@ func UvarintSize(x uint64) (i int) {
}
return i + 1
}
func hexdump(b []byte) { os.Stderr.Write([]byte(hex.Dump(b))) }

View file

@ -34,11 +34,6 @@ const (
viewBSIGroupPrefix = "bsig_"
)
// isValidView returns true if name is valid.
func isValidView(name string) bool {
return name == ViewStandard
}
// View represents a container for field data.
type View struct {
mu sync.RWMutex