Skip to content

Commit 4c2ee23

Browse files
committed
Deprecate ErrNoGoFiles as it's never returned
1 parent fea8490 commit 4c2ee23

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Diff for: errcheck/errcheck.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ func init() {
2323
}
2424

2525
var (
26-
// ErrNoGoFiles is returned when CheckPackage is run on a package with no Go source files
26+
// ErrNoGoFiles is returned when CheckPackage is run on a package with no Go source files.
27+
//
28+
// Deprecated: this error is no longer returned by errcheck.LoadPackages.
2729
ErrNoGoFiles = errors.New("package contains no go source files")
2830
)
2931

Diff for: main.go

-4
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ func mainCmd(args []string) int {
121121

122122
result, err := checkPaths(&checker, paths...)
123123
if err != nil {
124-
if err == errcheck.ErrNoGoFiles {
125-
fmt.Fprintln(os.Stderr, err)
126-
return exitCodeOk
127-
}
128124
fmt.Fprintf(os.Stderr, "error: failed to check packages: %s\n", err)
129125
return exitFatalError
130126
}

0 commit comments

Comments
 (0)