From c6289f8f5645f6d3e857941af5936c4330522180 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Sun, 24 Sep 2017 22:23:13 -0700 Subject: [PATCH] gofmt --- cmd/watcher/main.go | 2 +- cmd/webapp/main.go | 6 +++--- gdax/listener_service.go | 4 ++-- gdax/websocket/client.go | 2 +- ops/registrar.go | 6 +++--- osutil/logger_service.go | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/watcher/main.go b/cmd/watcher/main.go index 6688efc..3ba41d6 100644 --- a/cmd/watcher/main.go +++ b/cmd/watcher/main.go @@ -15,5 +15,5 @@ func main() { } t := make(chan bool) - <- t + <-t } diff --git a/cmd/webapp/main.go b/cmd/webapp/main.go index 14e9b94..181bfc7 100644 --- a/cmd/webapp/main.go +++ b/cmd/webapp/main.go @@ -1,10 +1,10 @@ package main import ( - "log" "github.com/kcotugno/tacitus/http" - "github.com/kcotugno/tacitus/postgres" "github.com/kcotugno/tacitus/osutil" + "github.com/kcotugno/tacitus/postgres" + "log" ) func main() { @@ -23,5 +23,5 @@ func main() { defer s.Close() s.Open() - <- s.Err + <-s.Err } diff --git a/gdax/listener_service.go b/gdax/listener_service.go index 29262ca..f2cad63 100644 --- a/gdax/listener_service.go +++ b/gdax/listener_service.go @@ -16,9 +16,9 @@ type ListenerService struct { subs []string - closed bool + closed bool shouldRestart bool - restMu sync.Mutex + restMu sync.Mutex } func (s *ListenerService) Open() error { diff --git a/gdax/websocket/client.go b/gdax/websocket/client.go index 8ac263e..38c4cba 100644 --- a/gdax/websocket/client.go +++ b/gdax/websocket/client.go @@ -1,8 +1,8 @@ package websocket import ( - "github.com/kcotugno/tacitus/gdax" "github.com/gorilla/websocket" + "github.com/kcotugno/tacitus/gdax" "sync" "time" diff --git a/ops/registrar.go b/ops/registrar.go index a518651..928b633 100644 --- a/ops/registrar.go +++ b/ops/registrar.go @@ -48,9 +48,9 @@ func (r *Registrar) SetLogger(logger tacitus.Logger) { } func (r *Registrar) record() { - go func () { + go func() { for t := range r.wc.Stream() { - go func (trade tacitus.Trade) { + go func(trade tacitus.Trade) { _, err := r.db.TradeService().CreateTrade(trade) if err != nil { r.logger.Info("Error inserting trade: %v", err) @@ -59,7 +59,7 @@ func (r *Registrar) record() { } }() - go func () { + go func() { for err := range r.wc.Error() { r.logger.Info("Registrar received error: %v", err) } diff --git a/osutil/logger_service.go b/osutil/logger_service.go index 98fd2cf..a2d2e2c 100644 --- a/osutil/logger_service.go +++ b/osutil/logger_service.go @@ -11,10 +11,10 @@ const tmpl = "%v - %v: " type LoggerService struct { DateFormat string - Utc bool + Utc bool file *os.File - log bool + log bool } func NewLogger() *LoggerService {