Errors

Any non-trivial program will have the need for error reporting sooner or later.Because of this Go has a builtin type specially for errors, called error. vare error creates a variable e of type error with the value nil. This errortype is an interface – we’ll look more at interfaces in . Fornow you can just assume that error is a type just like all other types.