Skip to content

Commit 1154212

Browse files
HongKuangdeadprogram
authored andcommitted
chore: fix function names in comment
Signed-off-by: hongkuang <[email protected]>
1 parent 22bf045 commit 1154212

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

cgo/cgo_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (i simpleImporter) Import(path string) (*types.Package, error) {
216216
}
217217
}
218218

219-
// formatDiagnostics formats the error message to be an indented comment. It
219+
// formatDiagnostic formats the error message to be an indented comment. It
220220
// also fixes Windows path name issues (backward slashes).
221221
func formatDiagnostic(err error) string {
222222
msg := err.Error()

src/machine/machine_atsamd21.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ var pinTimerMapping = [...]uint8{
16571657
PB30 / 2: pinTCC0Ch0 | pinTCC1Ch2<<4,
16581658
}
16591659

1660-
// findPinPadMapping returns the pin mode (PinTCC or PinTCCAlt) and the channel
1660+
// findPinTimerMapping returns the pin mode (PinTCC or PinTCCAlt) and the channel
16611661
// number for a given timer and pin. A zero PinMode is returned if no mapping
16621662
// could be found.
16631663
func findPinTimerMapping(timer uint8, pin Pin) (PinMode, uint8) {

src/machine/machine_atsamd51.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,7 @@ var pinTimerMapping = [...]struct{ F, G uint8 }{
19281928
PB02 / 2: {pinTCC2_2, 0},
19291929
}
19301930

1931-
// findPinPadMapping returns the pin mode (PinTCCF or PinTCCG) and the channel
1931+
// findPinTimerMapping returns the pin mode (PinTCCF or PinTCCG) and the channel
19321932
// number for a given timer and pin. A zero PinMode is returned if no mapping
19331933
// could be found.
19341934
func findPinTimerMapping(timer uint8, pin Pin) (PinMode, uint8) {

src/os/tempfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func joinPath(dir, name string) string {
142142
return dir + string(PathSeparator) + name
143143
}
144144

145-
// LastIndexByte from the strings package.
145+
// lastIndex from the strings package.
146146
func lastIndex(s string, sep byte) int {
147147
for i := len(s) - 1; i >= 0; i-- {
148148
if s[i] == sep {

src/reflect/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ func (t *rawType) Comparable() bool {
980980
return (t.meta & flagComparable) == flagComparable
981981
}
982982

983-
// isbinary() returns if the hashmapAlgorithmBinary functions can be used on this type
983+
// isBinary returns if the hashmapAlgorithmBinary functions can be used on this type
984984
func (t *rawType) isBinary() bool {
985985
return (t.meta & flagIsBinary) == flagIsBinary
986986
}

src/sync/mutex_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func TestRWMutexWriteToRead(t *testing.T) {
196196
}
197197
}
198198

199-
// TestRWMutexWriteToRead tests the transition from a read lock to a write lock while contended.
199+
// TestRWMutexReadToWrite tests the transition from a read lock to a write lock while contended.
200200
func TestRWMutexReadToWrite(t *testing.T) {
201201
// Create a new RWMutex and read-lock it several times.
202202
const n = 3

0 commit comments

Comments
 (0)