From b2dbb86d6757f23156cdbdc72baa2fee3bb0748e Mon Sep 17 00:00:00 2001 From: Cedric Cordenier Date: Fri, 19 Jul 2024 14:52:02 +0100 Subject: [PATCH] Stop coercing capability.ID since it's already a string --- core/capabilities/launcher.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/capabilities/launcher.go b/core/capabilities/launcher.go index e3d1863d624..b4ade04127b 100644 --- a/core/capabilities/launcher.go +++ b/core/capabilities/launcher.go @@ -271,7 +271,7 @@ type capabilityService interface { } func (w *launcher) addToRegistryAndSetDispatcher(ctx context.Context, capability registrysyncer.Capability, don registrysyncer.DON, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { - capabilityID := string(capability.ID) + capabilityID := capability.ID info, err := capabilities.NewRemoteCapabilityInfo( capabilityID, capability.CapabilityType, @@ -386,7 +386,7 @@ type receiverService interface { } func (w *launcher) addReceiver(ctx context.Context, capability registrysyncer.Capability, don registrysyncer.DON, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { - capID := string(capability.ID) + capID := capability.ID info, err := capabilities.NewRemoteCapabilityInfo( capID, capability.CapabilityType, @@ -396,7 +396,7 @@ func (w *launcher) addReceiver(ctx context.Context, capability registrysyncer.Ca if err != nil { return fmt.Errorf("failed to instantiate remote capability for receiver: %w", err) } - underlying, err := w.registry.Get(ctx, string(capability.ID)) + underlying, err := w.registry.Get(ctx, capability.ID) if err != nil { return fmt.Errorf("failed to get capability from registry: %w", err) }