Skip to content

Commit

Permalink
Stop coercing capability.ID since it's already a string
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-cordenier committed Jul 19, 2024
1 parent 3eab4d7 commit b2dbb86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/capabilities/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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)
}
Expand Down

0 comments on commit b2dbb86

Please sign in to comment.