rename mucp source directory to service
This commit is contained in:
18
config/source/service/options.go
Normal file
18
config/source/service/options.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/micro/go-micro/config/source"
|
||||
)
|
||||
|
||||
type serviceNameKey struct{}
|
||||
|
||||
func ServiceName(a string) source.Option {
|
||||
return func(o *source.Options) {
|
||||
if o.Context == nil {
|
||||
o.Context = context.Background()
|
||||
}
|
||||
o.Context = context.WithValue(o.Context, serviceNameKey{}, a)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user