Change the provider separator from . to @
This commit is contained in:
parent
4012599264
commit
e9792b446f
34 changed files with 465 additions and 465 deletions
|
@ -15,7 +15,7 @@ const (
|
|||
|
||||
// AddProviderInContext Adds the provider name in the context
|
||||
func AddProviderInContext(ctx context.Context, elementName string) context.Context {
|
||||
parts := strings.Split(elementName, ".")
|
||||
parts := strings.Split(elementName, "@")
|
||||
if len(parts) == 1 {
|
||||
log.FromContext(ctx).Debugf("Could not find a provider for %s.", elementName)
|
||||
return ctx
|
||||
|
@ -30,7 +30,7 @@ func AddProviderInContext(ctx context.Context, elementName string) context.Conte
|
|||
|
||||
// GetQualifiedName Gets the fully qualified name.
|
||||
func GetQualifiedName(ctx context.Context, elementName string) string {
|
||||
parts := strings.Split(elementName, ".")
|
||||
parts := strings.Split(elementName, "@")
|
||||
if len(parts) == 1 {
|
||||
if providerName, ok := ctx.Value(providerKey).(string); ok {
|
||||
return MakeQualifiedName(providerName, parts[0])
|
||||
|
@ -41,5 +41,5 @@ func GetQualifiedName(ctx context.Context, elementName string) string {
|
|||
|
||||
// MakeQualifiedName Creates a qualified name for an element
|
||||
func MakeQualifiedName(providerName string, elementName string) string {
|
||||
return providerName + "." + elementName
|
||||
return providerName + "@" + elementName
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue