mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
fix MustSetBit and cleanup dead code
This commit is contained in:
parent
91622684cf
commit
bc0fce99d5
2 changed files with 6 additions and 9 deletions
|
|
@ -237,6 +237,12 @@ func (f *TestField) Reopen() error {
|
|||
}
|
||||
|
||||
func (f *TestField) MustSetBit(row, col uint64, ts ...time.Time) {
|
||||
if len(ts) == 0 {
|
||||
_, err := f.Field.SetBit(row, col, nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
for _, t := range ts {
|
||||
_, err := f.Field.SetBit(row, col, &t)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -23,11 +23,9 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pilosa/pilosa/http"
|
||||
"github.com/pilosa/pilosa/server"
|
||||
"github.com/pilosa/pilosa/toml"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
@ -43,13 +41,6 @@ type Command struct {
|
|||
Stderr bytes.Buffer
|
||||
}
|
||||
|
||||
func OptAntiEntropyInterval(dur time.Duration) server.CommandOption {
|
||||
return func(m *server.Command) error {
|
||||
m.Config.AntiEntropy.Interval = toml.Duration(dur)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func OptAllowedOrigins(origins []string) server.CommandOption {
|
||||
return func(m *server.Command) error {
|
||||
m.Config.Handler.AllowedOrigins = origins
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue