mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-14 02:33:03 +02:00
fix: delete redundant type conversion (#1977)
This commit is contained in:
parent
bc9d2074af
commit
ddc82ce45e
@ -20,9 +20,9 @@ type options struct {
|
||||
|
||||
// WithContext with registry context.
|
||||
func WithContext(ctx context.Context) Option {
|
||||
return Option(func(o *options) {
|
||||
return func(o *options) {
|
||||
o.ctx = ctx
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// WithPath is config path
|
||||
|
@ -19,25 +19,25 @@ type options struct {
|
||||
prefix bool
|
||||
}
|
||||
|
||||
// WithContext with registry context.
|
||||
// WithContext with registry context.
|
||||
func WithContext(ctx context.Context) Option {
|
||||
return Option(func(o *options) {
|
||||
return func(o *options) {
|
||||
o.ctx = ctx
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// WithPath is config path
|
||||
func WithPath(p string) Option {
|
||||
return Option(func(o *options) {
|
||||
return func(o *options) {
|
||||
o.path = p
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// WithPrefix is config prefix
|
||||
func WithPrefix(prefix bool) Option {
|
||||
return Option(func(o *options) {
|
||||
return func(o *options) {
|
||||
o.prefix = prefix
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
type source struct {
|
||||
|
Loading…
Reference in New Issue
Block a user