36 getScratchCodeResp map[string]interface{}
37)
38
39var PluginInitErr = errors.New("plugin doesn't implement PluginInitializer interface") 40
41func InitProject(conf *configs.Project, r *router) *project {
42 var p = &project{
The error variable name should be chosen carefully to convey the meaning of the error. It is recommended to use names like errFoo
, ErrSomethingBad
, ErrKindFoo
or BazError
for error variables that are part of an API.
Examples:
_, e := ioutil.ReadFile("file.txt")
if e != nil {
log.Fatal(e)
}
_, err := ioutil.ReadFile("file.txt")
if err != nil {
log.Fatal(err)
}
Reference: Effective Go - Errors