Hi there, I ran into a strange type assertion error today and was hoping someone could help point me in the right direction. I have a uint32 that I am storing in a net/context but when I try and access it, I am getting the following error:
panic: interface conversion: interface is float64, not uint32
Here is how I store it in the context:
ctx = context.WithValue(ctx, "auth.uid", token.Claims["sub"])
If I dump the context I see:
WithValue("auth.uid", 1)
Then when I access the value from the context I assert uint32 and receive the error.
uid := ctx.Value("auth.uid).(uint32)
I'm sure I am missing something obvious, but i have been spinning on this for a bit now. Thanks for any pointers