Proposal Details
Assumes #77273
With generic methods, we can make TypeAssert easier to use.
Proposal:
// TypeAssert is semantically equivalent to:
//
// v2, ok := v.Interface().(T)
func (v Value) TypeAssert[T any] (v2 T, ok bool)
And we can mark the normal TypeAssert with go:fix inline:
//go:fix inline
func TypeAssert[T any](v Value) (T, bool) {
return v.TypeAssert[T]()
}
Proposal Details
Assumes #77273
With generic methods, we can make TypeAssert easier to use.
Proposal:
And we can mark the normal
TypeAssertwithgo:fix inline: