fix MustSetBit and cleanup dead code

This commit is contained in:
Matt Jaffee 2018-07-03 08:53:16 -05:00
parent 91622684cf
commit bc0fce99d5
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF
2 changed files with 6 additions and 9 deletions

View file

@ -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 {

View file

@ -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