remove unused function

This commit is contained in:
kim 2024-11-26 16:36:08 +00:00
parent 305c50b037
commit aa7191eb52

View file

@ -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()