checkerror

package
v0.0.0-...-18074f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Example (Errortest)
pkglist, err := pkgutil.FindAllSubPackages("errortest", "")
if err != nil {
	fmt.Println(err)
}
errs := Check(pkglist, false)
for _, err := range errs {
	fmt.Println(err)
}
Output:

error factory "github.com/tsaikd/gobuilder/checkerror/vendor/errortest/provide" "ErrorProvideTest" declared but not used
error factory "github.com/tsaikd/gobuilder/checkerror/vendor/errortest/provide2" "ErrorProvide2Test" declared but not used
Example (Gobuilder)
pkglist, err := pkgutil.FindAllSubPackages("github.com/tsaikd/gobuilder", "..")
if err != nil {
	fmt.Println(err)
}
errs := Check(pkglist, false)
for _, err := range errs {
	fmt.Println(err)
}
Output:

Example (Pkgtest)
pkglist, err := pkgutil.FindAllSubPackages("pkgtest", "")
if err != nil {
	fmt.Println(err)
}
errs := Check(pkglist, false)
for _, err := range errs {
	fmt.Println(err)
}
Output:

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	ErrorUnusedFactory2      = errutil.NewFactory("error factory %q %q declared but not used")
	ErrorNoErrorFactoryFound = errutil.NewFactory("no error factory found")
)

errors

Functions

func Check

func Check(pkglist *pkgutil.PackageList, allowNoFactory bool) (errs []error)

Check redundant error factory in pkglist

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL