Debian Codegraph @

vendor/github.com/xyproto/gfx/errors.go

raw
1 package gfx
2
3 // ErrDone can for example be returned when you are done rendering.
4 var ErrDone = Error("done")
5
6 // Error is a string that implements the error interface.
7 type Error string
8
9 // Error implements the error interface.
10 func (e Error) Error() string {
11 return string(e)
12 }
13
14 // Errorf constructs a formatted error.
15 func Errorf(format string, a ...interface{}) error {
16 return Error(Sprintf(format, a...))
17 }