Relative Content

Tag Archive for gogenerics

Converting `func() Foo` to `func() any` in Golang?

Issue The immediate issue is that a function of type func() Foo cannot be assigned func() any in Golang. Perhaps this is an XY problem, so I will explain why exactly I am even in this situation. Example I essentially have something like a health check package as such (this is a simplified model for […]

Converting `func() Foo` to `func() any` in Golang?

Issue The immediate issue is that a function of type func() Foo cannot be assigned func() any in Golang. Perhaps this is an XY problem, so I will explain why exactly I am even in this situation. Example I essentially have something like a health check package as such (this is a simplified model for […]

Converting `func() Foo` to `func() any` in Golang?

Issue The immediate issue is that a function of type func() Foo cannot be assigned func() any in Golang. Perhaps this is an XY problem, so I will explain why exactly I am even in this situation. Example I essentially have something like a health check package as such (this is a simplified model for […]