summaryrefslogtreecommitdiff
path: root/src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/github.com/3rf/mongo-lint/testdata/errorf.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/github.com/3rf/mongo-lint/testdata/errorf.go')
-rw-r--r--src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/github.com/3rf/mongo-lint/testdata/errorf.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/github.com/3rf/mongo-lint/testdata/errorf.go b/src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/github.com/3rf/mongo-lint/testdata/errorf.go
deleted file mode 100644
index 768fb8ce60f..00000000000
--- a/src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/github.com/3rf/mongo-lint/testdata/errorf.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Test for not using fmt.Errorf.
-
-// Package foo ...
-package foo
-
-import (
- "errors"
- "fmt"
-)
-
-func f(x int) error {
- if x > 10 {
- return errors.New(fmt.Sprintf("something %d", x)) // MATCH /should replace.*errors\.New\(fmt\.Sprintf\(\.\.\.\)\).*fmt\.Errorf\(\.\.\.\)/
- }
- if x > 5 {
- return errors.New(g("blah")) // ok
- }
- if x > 4 {
- return errors.New("something else") // ok
- }
- return nil
-}