I've done many reading on Go generic method parameters, and it seems
somewhat supported, like from
A generic Get() & Set() can be defined and used:
----------------------------
// Set sets the value.
func (o *Optional[T]) Set(v T) {
o.value = &v
}
...
Now the user of my library could write code like this:
o := New(42)
v, err := o.Get()
----------------------------
However, I was having a hard time trying to apply that to my following code:
Is it possible to get its generic Get() & Set() function working (which is currently commented out)?
Thanks