In Go, what is the
error type?- aA built-in exception class thrown automatically by the runtime
- bAn interface with one method: Error() string✓
- cA struct with Code and Message fields defined in package errors
- dA reserved keyword used only inside panic statements
Explanation:error is defined as
type error interface { Error() string }. Any type implementing that method satisfies the interface. Go has no built-in exception mechanism for ordinary error handling; errors are ordinary values.