Skip to content

Commit fe268f4

Browse files
authored
docs: fix typos in testdata (#4116)
1 parent be034aa commit fe268f4

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

test/testdata/forbidigo_example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ import (
1010

1111
func Forbidigo() {
1212
fmt.Printf("too noisy!!!") // want "use of `fmt\\.Printf` forbidden by pattern `fmt\\\\.Print\\.\\*`"
13-
fmt2.Printf("too noisy!!!") // Not detected because analyze-types is false by default for backward compatbility.
13+
fmt2.Printf("too noisy!!!") // Not detected because analyze-types is false by default for backward compatibility.
1414
time.Sleep(time.Nanosecond) // want "no sleeping!"
1515
}

test/testdata/gochecknoglobals.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
var noGlobalsVar int // want "noGlobalsVar is a global variable"
11-
var ErrSomeType = errors.New("test that global erorrs aren't warned")
11+
var ErrSomeType = errors.New("test that global errors aren't warned")
1212

1313
var (
1414
OnlyDigites = regexp.MustCompile(`^\d+$`)

test/testdata/nonamedreturns_custom.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ var (
5656
)
5757

5858
// this should not match as the implementation does not need named parameters (see below)
59-
type funcDefintion func(arg1, arg2 interface{}) (num int, err error)
59+
type funcDefinition func(arg1, arg2 interface{}) (num int, err error)
6060

61-
func funcDefintionImpl(arg1, arg2 interface{}) (int, error) {
61+
func funcDefinitionImpl(arg1, arg2 interface{}) (int, error) {
6262
return 0, nil
6363
}
6464

65-
func funcDefintionImpl2(arg1, arg2 interface{}) (num int, err error) { // want `named return "num" with type "int" found`
65+
func funcDefinitionImpl2(arg1, arg2 interface{}) (num int, err error) { // want `named return "num" with type "int" found`
6666
return 0, nil
6767
}
6868

69-
func funcDefintionImpl3(arg1, arg2 interface{}) (num int, _ error) { // want `named return "num" with type "int" found`
69+
func funcDefinitionImpl3(arg1, arg2 interface{}) (num int, _ error) { // want `named return "num" with type "int" found`
7070
return 0, nil
7171
}
7272

73-
func funcDefintionImpl4(arg1, arg2 interface{}) (_ int, _ error) {
73+
func funcDefinitionImpl4(arg1, arg2 interface{}) (_ int, _ error) {
7474
return 0, nil
7575
}
7676

@@ -88,12 +88,12 @@ func test() {
8888
a := funcVar()
8989
_ = a
9090

91-
var function funcDefintion
92-
function = funcDefintionImpl
91+
var function funcDefinition
92+
function = funcDefinitionImpl
9393
i, err := function("", "")
9494
_ = i
9595
_ = err
96-
function = funcDefintionImpl2
96+
function = funcDefinitionImpl2
9797
i, err = function("", "")
9898
_ = i
9999
_ = err

0 commit comments

Comments
 (0)