diff --git a/broker/broker.go b/broker/broker.go index f95de4b4..11e029ed 100644 --- a/broker/broker.go +++ b/broker/broker.go @@ -10,7 +10,7 @@ import ( ) // DefaultBroker default memory broker -var DefaultBroker = NewBroker() +var DefaultBroker Broker = NewBroker() var ( // ErrNotConnected returns when broker used but not connected yet diff --git a/config/config.go b/config/config.go index ea00fd74..44c18f76 100644 --- a/config/config.go +++ b/config/config.go @@ -13,7 +13,7 @@ type Validator interface { } // DefaultConfig default config -var DefaultConfig = NewConfig() +var DefaultConfig Config = NewConfig() // DefaultWatcherMinInterval default min interval for poll changes var DefaultWatcherMinInterval = 5 * time.Second diff --git a/logger/logger.go b/logger/logger.go index 65bcdd16..71dcc2d2 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -3,7 +3,6 @@ package logger // import "go.unistack.org/micro/v3/logger" import ( "context" - "os" ) type ContextAttrFunc func(ctx context.Context) []interface{} @@ -12,7 +11,7 @@ var DefaultContextAttrFuncs []ContextAttrFunc var ( // DefaultLogger variable - DefaultLogger = NewLogger(WithLevel(ParseLevel(os.Getenv("MICRO_LOG_LEVEL")))) + DefaultLogger Logger = NewLogger() // DefaultLevel used by logger DefaultLevel = InfoLevel // DefaultCallerSkipCount used by logger diff --git a/meter/meter.go b/meter/meter.go index 71da6914..887b8236 100644 --- a/meter/meter.go +++ b/meter/meter.go @@ -1,5 +1,5 @@ // Package meter is for instrumentation -package meter // import "go.unistack.org/micro/v3/meter" +package meter import ( "io" @@ -11,7 +11,7 @@ import ( var ( // DefaultMeter is the default meter - DefaultMeter = NewMeter() + DefaultMeter Meter = NewMeter() // DefaultAddress data will be made available on this host:port DefaultAddress = ":9090" // DefaultPath the meter endpoint where the Meter data will be made available diff --git a/register/register.go b/register/register.go index 30055da1..bfe0078a 100644 --- a/register/register.go +++ b/register/register.go @@ -18,7 +18,7 @@ var DefaultDomain = "micro" var ( // DefaultRegister is the global default register - DefaultRegister = NewRegister() + DefaultRegister Register = NewRegister() // ErrNotFound returned when LookupService is called and no services found ErrNotFound = errors.New("service not found") // ErrWatcherStopped returned when when watcher is stopped diff --git a/resolver/resolver.go b/resolver/resolver.go index 7ba1f6cf..1e3e91e6 100644 --- a/resolver/resolver.go +++ b/resolver/resolver.go @@ -1,5 +1,5 @@ // Package resolver resolves network names to addresses -package resolver // import "go.unistack.org/micro/v3/resolver" +package resolver // Resolver is network resolver. It's used to find network nodes // via the name to connect to. This is done based on Network.Name(). diff --git a/router/router.go b/router/router.go index 2509b7c5..43874196 100644 --- a/router/router.go +++ b/router/router.go @@ -7,7 +7,7 @@ import ( var ( // DefaultRouter is the global default router - DefaultRouter = NewRouter() + DefaultRouter Router = NewRouter() // DefaultNetwork is default micro network DefaultNetwork = "micro" // ErrRouteNotFound is returned when no route was found in the routing table diff --git a/server/server.go b/server/server.go index e38d06e8..f6ea3956 100644 --- a/server/server.go +++ b/server/server.go @@ -11,7 +11,7 @@ import ( ) // DefaultServer default server -var DefaultServer = NewServer() +var DefaultServer Server = NewServer() var ( // DefaultAddress will be used if no address passed, use secure localhost diff --git a/store/store.go b/store/store.go index 251c2ba0..896c1350 100644 --- a/store/store.go +++ b/store/store.go @@ -12,7 +12,7 @@ var ( // ErrInvalidKey is returned when a key has empty or have invalid format ErrInvalidKey = errors.New("invalid key") // DefaultStore is the global default store - DefaultStore = NewStore() + DefaultStore Store = NewStore() // DefaultSeparator is the gloabal default key parts separator DefaultSeparator = "/" ) diff --git a/tracer/tracer.go b/tracer/tracer.go index 46c72c41..53f42f13 100644 --- a/tracer/tracer.go +++ b/tracer/tracer.go @@ -10,7 +10,7 @@ import ( ) // DefaultTracer is the global default tracer -var DefaultTracer = NewTracer() +var DefaultTracer Tracer = NewTracer() var ( // TraceIDKey is the key used for the trace id in the log call