You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use go 1.18 new feature: generics, I get error: expected '(', found '[' (and 1 more errors).
Obviously, swag parse not support go 1.18 new feature generics.
So when to support generics 😶
func IsElemInList[T any](elem T, list []T) bool {
for i := 0; i < len(list); i++ {
if reflect.DeepEqual(elem, list[i]) {
return true
}
}
return false
}
The text was updated successfully, but these errors were encountered:
When I use go 1.18 new feature: generics, I get error:
expected '(', found '[' (and 1 more errors)
.Obviously, swag parse not support go 1.18 new feature generics.
So when to support generics 😶
The text was updated successfully, but these errors were encountered: