Add go fmt

This commit is contained in:
James Jeffrey
2017-07-07 10:14:08 -07:00
committed by Reed Allman
parent 9a7141967c
commit 81e39b210d
40 changed files with 185 additions and 187 deletions

View File

@@ -19,11 +19,11 @@ import (
)
type BoltDatastore struct {
routesBucket []byte
appsBucket []byte
logsBucket []byte
extrasBucket []byte
callsBucket []byte
routesBucket []byte
appsBucket []byte
logsBucket []byte
extrasBucket []byte
callsBucket []byte
db *bolt.DB
log logrus.FieldLogger
}
@@ -69,11 +69,11 @@ func New(url *url.URL) (models.Datastore, error) {
}
ds := &BoltDatastore{
routesBucket: routesBucketName,
appsBucket: appsBucketName,
logsBucket: logsBucketName,
extrasBucket: extrasBucketName,
callsBucket: callsBucketName,
routesBucket: routesBucketName,
appsBucket: appsBucketName,
logsBucket: logsBucketName,
extrasBucket: extrasBucketName,
callsBucket: callsBucketName,
db: db,
log: log,
}
@@ -82,7 +82,6 @@ func New(url *url.URL) (models.Datastore, error) {
return datastoreutil.NewValidator(ds), nil
}
func (ds *BoltDatastore) InsertTask(ctx context.Context, task *models.Task) error {
var fnCall *models.FnCall
taskID := []byte(task.ID)
@@ -126,7 +125,6 @@ func (ds *BoltDatastore) GetTasks(ctx context.Context, filter *models.CallFilter
return res, err
}
func (ds *BoltDatastore) GetTask(ctx context.Context, callID string) (*models.FnCall, error) {
var res *models.FnCall
err := ds.db.View(func(tx *bolt.Tx) error {
@@ -147,7 +145,6 @@ func (ds *BoltDatastore) GetTask(ctx context.Context, callID string) (*models.Fn
return res, err
}
func (ds *BoltDatastore) InsertApp(ctx context.Context, app *models.App) (*models.App, error) {
appname := []byte(app.Name)

View File

@@ -28,7 +28,6 @@ func setLogBuffer() *bytes.Buffer {
return &buf
}
func Test(t *testing.T, ds models.Datastore) {
buf := setLogBuffer()

View File

@@ -11,7 +11,7 @@ type mock struct {
Apps models.Apps
Routes models.Routes
Calls models.FnCalls
data map[string][]byte
data map[string][]byte
}
func NewMock() models.Datastore {

View File

@@ -8,4 +8,4 @@ import (
func TestDatastore(t *testing.T) {
datastoretest.Test(t, NewMock())
}
}

View File

@@ -53,7 +53,6 @@ const callsTableCreate = `CREATE TABLE IF NOT EXISTS calls (
const callSelector = `SELECT id, created_at, started_at, completed_at, status, app_name, path FROM calls`
type PostgresDatastore struct {
db *sql.DB
}