NewConfig returns native type
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
34ccee74c5
commit
a4e36c21ee
@ -12,6 +12,8 @@ import (
|
||||
rutil "go.unistack.org/micro/v3/util/reflect"
|
||||
)
|
||||
|
||||
var _ config.Config = &serviceConfig{}
|
||||
|
||||
var DefaultStructTag = "service"
|
||||
|
||||
type serviceConfig struct {
|
||||
@ -142,7 +144,7 @@ func (c *serviceConfig) Watch(ctx context.Context, opts ...config.WatchOption) (
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func NewConfig(opts ...config.Option) config.Config {
|
||||
func NewConfig(opts ...config.Option) *serviceConfig {
|
||||
options := config.NewOptions(opts...)
|
||||
if len(options.StructTag) == 0 {
|
||||
options.StructTag = DefaultStructTag
|
||||
|
Loading…
x
Reference in New Issue
Block a user