@@ -33,21 +33,18 @@ func ProviderSpecificAnnotations(annotations map[string]string) (endpoint.Provid
3333 for k , v := range annotations {
3434 if k == SetIdentifierKey {
3535 setIdentifier = v
36- } else if strings .HasPrefix (k , AWSPrefix ) {
37- attr := strings .TrimPrefix (k , AWSPrefix )
36+ } else if attr , ok := strings .CutPrefix (k , AWSPrefix ); ok {
3837 providerSpecificAnnotations = append (providerSpecificAnnotations , endpoint.ProviderSpecificProperty {
3938 Name : fmt .Sprintf ("aws/%s" , attr ),
4039 Value : v ,
4140 })
42- } else if strings .HasPrefix (k , SCWPrefix ) {
43- attr := strings .TrimPrefix (k , SCWPrefix )
41+ } else if attr , ok := strings .CutPrefix (k , SCWPrefix ); ok {
4442 providerSpecificAnnotations = append (providerSpecificAnnotations , endpoint.ProviderSpecificProperty {
4543 Name : fmt .Sprintf ("scw/%s" , attr ),
4644 Value : v ,
4745 })
48- } else if strings .HasPrefix (k , WebhookPrefix ) {
46+ } else if attr , ok := strings .CutPrefix (k , WebhookPrefix ); ok {
4947 // Support for wildcard annotations for webhook providers
50- attr := strings .TrimPrefix (k , WebhookPrefix )
5148 providerSpecificAnnotations = append (providerSpecificAnnotations , endpoint.ProviderSpecificProperty {
5249 Name : fmt .Sprintf ("webhook/%s" , attr ),
5350 Value : v ,
0 commit comments