In Go, error is a built-in interface:
type error interface {
Error() string
}
Any type with an Error() method that returns a string satisfies this interface. When something goes wrong, functions return an error value. When everything works, they return nil.