From aa7191eb52c512f5cb5e6c67bb8dc38aea7d5164 Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 26 Nov 2024 16:36:08 +0000 Subject: [PATCH] remove unused function --- internal/ap/properties.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/internal/ap/properties.go b/internal/ap/properties.go index a00e781e3..0a2564168 100644 --- a/internal/ap/properties.go +++ b/internal/ap/properties.go @@ -81,15 +81,6 @@ func SetJSONLDIdStr(with WithJSONLDId, id string) error { return nil } -// TryGet tries to get value from 'a' with 'get', only if necessary interface is implemented. -func TryGet[W any, T any](get func(W) T, a any) (T, bool) { - if with, ok := a.(W); ok { - return get(with), true - } - var zero T - return zero, false -} - // GetTo returns the IRIs contained in the To property of 'with'. Panics on entries with missing ID. func GetTo(with WithTo) []*url.URL { toProp := with.GetActivityStreamsTo()