-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.
Description
The following text from the description of the package is at least misleading:
// If the test file is in the same package, it may refer to unexported
// identifiers within the package, as in this example:
//
// package abs
//
// import "testing"
//
// func TestAbs(t *testing.T) {
// got := Abs(-1)
// if got != 1 {
// t.Errorf("Abs(-1) = %d; want 1", got)
// }
// }
it may refer to unexported identifiers within the package, as in this example:
And then, in the example, we have an exported Abs
identifier?
The Abs
is then used in the next example, that refers to exported identifiers, and that usage is correct.
But the mentioned first example confuses the reader.
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.