Ok, good to know. How do I solve this problem? It almost looks like I have to create a slice of the generic type and iterate through the entries in the commitsCache result, doing a type conversion of every entry.
On Wednesday, February 12, 2025 at 2:15:03 PM UTC-8 Jan Mercl wrote: > On Wed, Feb 12, 2025 at 10:54 PM David Karr <davidmic...@gmail.com> wrote: > > `[]any` is a slice type (https://go.dev/ref/spec#Slice_types), not an > interface type (https://go.dev/ref/spec#Interface_types). > > But type assertions, as in `expr.(someType)`, are valid only for > interface types: https://go.dev/ref/spec#Type_assertions > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/cb6b223d-8dce-4249-bbeb-3eff92e0e36dn%40googlegroups.com.