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

@@ -14,15 +14,13 @@ import (
"gitlab-odx.oracle.com/odx/functions/api/models"
)
type BoltLogDatastore struct {
callLogsBucket []byte
db *bolt.DB
log logrus.FieldLogger
datastore models.Datastore
db *bolt.DB
log logrus.FieldLogger
datastore models.Datastore
}
func NewBolt(url *url.URL) (models.FnLog, error) {
dir := filepath.Dir(url.Path)
log := logrus.WithFields(logrus.Fields{"logdb": url.Scheme, "dir": dir})
@@ -60,8 +58,8 @@ func NewBolt(url *url.URL) (models.FnLog, error) {
fnl := &BoltLogDatastore{
callLogsBucket: callLogsBucketName,
db: db,
log: log,
db: db,
log: log,
}
log.WithFields(logrus.Fields{"prefix": bucketPrefix, "file": url.Path}).Debug("BoltDB initialized")
@@ -71,7 +69,7 @@ func NewBolt(url *url.URL) (models.FnLog, error) {
func (fnl *BoltLogDatastore) InsertLog(ctx context.Context, callID string, callLog string) error {
log := &models.FnCallLog{
CallID: callID,
Log: callLog,
Log: callLog,
}
id := []byte(callID)
err := fnl.db.Update(