From 12eff1cc609827b52fde6e2026ec4c7779e91bad Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Fri, 24 Sep 2021 09:08:39 +0100 Subject: [PATCH] go fmt --- cmd/cmd.go | 3 +-- cmd/options.go | 4 ++-- util/wrapper/wrapper.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 1f607a20..c92a5d8d 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -616,7 +616,7 @@ func (c *cmd) Before(ctx *cli.Context) error { if name := ctx.String("config"); len(name) > 0 { // only change if we have the server and type differs if r, ok := c.opts.Configs[name]; ok { - rc , err := r() + rc, err := r() if err != nil { logger.Fatalf("Error configuring config: %v", err) } @@ -624,7 +624,6 @@ func (c *cmd) Before(ctx *cli.Context) error { } } - return nil } diff --git a/cmd/options.go b/cmd/options.go index f5a43916..430e68ea 100644 --- a/cmd/options.go +++ b/cmd/options.go @@ -2,7 +2,7 @@ package cmd import ( "context" - + "github.com/asim/go-micro/v3/auth" "github.com/asim/go-micro/v3/broker" "github.com/asim/go-micro/v3/cache" @@ -228,7 +228,7 @@ func NewAuth(name string, t func(...auth.Option) auth.Auth) Option { } // New config func -func NewConfig(name string, t func(...config.Option) (config.Config, error)) Option { +func NewConfig(name string, t func(...config.Option) (config.Config, error)) Option { return func(o *Options) { o.Configs[name] = t } diff --git a/util/wrapper/wrapper.go b/util/wrapper/wrapper.go index 0569a4ac..5f9ac28e 100644 --- a/util/wrapper/wrapper.go +++ b/util/wrapper/wrapper.go @@ -129,7 +129,7 @@ func TraceHandler(t trace.Tracer) server.HandlerWrapper { } func AuthCall(a func() auth.Auth, c client.Client) client.Client { - return &authWrapper{Client:c, auth: a} + return &authWrapper{Client: c, auth: a} } type authWrapper struct {