rename mucp source directory to service

This commit is contained in:
shu xian
2020-01-17 23:53:33 +08:00
parent ad28b72dd3
commit 9ea4919b9b
7 changed files with 7 additions and 7 deletions

View 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)
}
}