/unsafeless

Transmuting types in Go without using unsafe or reflect

Primary LanguageGo

unsafeless

Transmuting types in Go without using unsafe or reflect. See unsafeless.go for an explanation and unsafeless_test.go for example usage.

This concept doesn't actually need Go 1.18, but the generics make it easier to use? Maybe? It might be even nicer if type inference worked properly.