From f41aff85a2e704664b4c0c3f815d247bcfd9bba1 Mon Sep 17 00:00:00 2001 From: ia Date: Sun, 17 Jun 2018 00:09:53 +0200 Subject: [PATCH] all: gofmt Run standard gofmt command on project root. - go version go1.10.3 darwin/amd64 Signed-off-by: ia --- logging/glog/glog.go | 2 +- logging/golog/golog.go | 2 +- logging/logging.go | 9 +++++---- state/channel.go | 8 ++++++-- state/nick.go | 4 +++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/logging/glog/glog.go b/logging/glog/glog.go index 40d49a0..3bc89c9 100644 --- a/logging/glog/glog.go +++ b/logging/glog/glog.go @@ -2,8 +2,8 @@ package glog import ( "fmt" - "github.com/golang/glog" "github.com/fluffle/goirc/logging" + "github.com/golang/glog" ) // Simple adapter to utilise Google's GLog package with goirc. diff --git a/logging/golog/golog.go b/logging/golog/golog.go index 5b12492..165d508 100644 --- a/logging/golog/golog.go +++ b/logging/golog/golog.go @@ -1,8 +1,8 @@ package golog import ( - log "github.com/fluffle/golog/logging" "github.com/fluffle/goirc/logging" + log "github.com/fluffle/golog/logging" ) // Simple adapter to utilise my logging package with goirc. diff --git a/logging/logging.go b/logging/logging.go index bd54416..f939fce 100644 --- a/logging/logging.go +++ b/logging/logging.go @@ -31,13 +31,14 @@ func SetLogger(l Logger) { // A nullLogger does nothing while fulfilling Logger. type nullLogger struct{} + func (nl nullLogger) Debug(f string, a ...interface{}) {} -func (nl nullLogger) Info(f string, a ...interface{}) {} -func (nl nullLogger) Warn(f string, a ...interface{}) {} +func (nl nullLogger) Info(f string, a ...interface{}) {} +func (nl nullLogger) Warn(f string, a ...interface{}) {} func (nl nullLogger) Error(f string, a ...interface{}) {} // Shim functions so that the package can be used directly func Debug(f string, a ...interface{}) { logger.Debug(f, a...) } -func Info(f string, a ...interface{}) { logger.Info(f, a...) } -func Warn(f string, a ...interface{}) { logger.Warn(f, a...) } +func Info(f string, a ...interface{}) { logger.Info(f, a...) } +func Warn(f string, a ...interface{}) { logger.Warn(f, a...) } func Error(f string, a ...interface{}) { logger.Error(f, a...) } diff --git a/state/channel.go b/state/channel.go index 35379d2..17b0580 100644 --- a/state/channel.go +++ b/state/channel.go @@ -248,7 +248,9 @@ func (ch *Channel) Equals(other *Channel) bool { // Duplicates a ChanMode struct. func (cm *ChanMode) Copy() *ChanMode { - if cm == nil { return nil } + if cm == nil { + return nil + } c := *cm return &c } @@ -260,7 +262,9 @@ func (cm *ChanMode) Equals(other *ChanMode) bool { // Duplicates a ChanPrivs struct. func (cp *ChanPrivs) Copy() *ChanPrivs { - if cp == nil { return nil } + if cp == nil { + return nil + } c := *cp return &c } diff --git a/state/nick.go b/state/nick.go index 7704b0b..ecd52c4 100644 --- a/state/nick.go +++ b/state/nick.go @@ -144,7 +144,9 @@ func (nk *Nick) Equals(other *Nick) bool { // Duplicates a NickMode struct. func (nm *NickMode) Copy() *NickMode { - if nm == nil { return nil } + if nm == nil { + return nil + } n := *nm return &n }