3 ms·
I've never seen or used reflection with error handling in Go, what do you mean?
by Thaxll 3y ago
I've never seen or used reflection with error handling in Go, what do you mean?
- sidlls 3y agohttps://cs.opensource.google/go/go/+/refs/tags/go1.21.6:src/errors/wrap.go;l=17 https://cs.opensource.google/go/go/+/refs/tags/go1.21.6:src/...
- Thaxll 3y agoBut this is a detail of implementation, user code does not use reflection with errors.
- derekperkins 3y agoI wouldn't classify type assertion as reflection. It's a super fast type check of the object header, not dynamic reflection.