This works, but goes against convention in that (from the context package docs) you shouldn’t “store Contexts inside a struct type; instead, pass a Context explicitly to each function that needs it.”
True. But this code is only proof-of-concept of how non-context-aware functions can be wrapped in a context. Such usage of context is not standard.
It does seem an unnecessarily limiting convention.
What will go wrong if one stores a Context in a struct?
I've done so for a specific use case, and did not notice any issues.