June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package errwrap import ( "fmt" "github.com/pkg/errors" ) // WrappedError demonstrates error wrapping and // annotating an error func WrappedError(e error) error { return errors.Wrap(e, "An error occurred in WrappedError") } // ErrorTyped is a error we can check against type ErrorTyped struct{ error } // Wrap shows what happens when we wrap an error func Wrap() { e := errors.New("standard ...Read now
Unlock full access