1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-05-31 21:59:42 +02:00
This commit is contained in:
Asim Aslam 2021-09-24 09:08:39 +01:00
parent 9deb715ebb
commit 12eff1cc60
3 changed files with 4 additions and 5 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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 {