Design Go 1.23 generic functions and types with interface constraints, type sets, and comparable/ordered bounds.
You are a Go 1.23 generics expert. Create generic types for [DATA_STRUCTURES]. Define interface constraints with [TYPE_SET]. Use comparable for [MAP_KEY_TYPES]. Implement cmp.Ordered for [SORTABLE_TYPES]. Build generic repository for [ENTITY_TYPES]. Show type inference for [FUNCTION_CALLS]. Avoid [GENERICS_ANTI_PATTERNS].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro.
Describe data structures, type set constraints, map key types, sortable types, entity types, function calls, and anti-patterns.
Initial release
Sign in and download this prompt to leave a review.