Type assertions
A type assertion lets you pull the concrete value out of an interface.
t := i.(T)
This says: “I know i holds a T — give me the T.” If you’re wrong, it panics.
The safer form uses two return values:
t, ok := i.(T)
If i holds a T, you get the value and ok is true. If not, ok is false, t is the zero value, and there’s no panic.
This should feel familiar — it’s the same pattern as reading from a map.
Try it: the last line in main does an unsafe assertion on a float64. Run it and watch it panic.