aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorhongkuang <[email protected]>2024-04-07 16:17:09 +0800
committerRon Evans <[email protected]>2024-04-20 14:58:06 +0200
commit1154212c15e6e97048e122068730dab5a1a9427f (patch)
tree0af7679d7429b6c714c35cdf51e34de87c6fd9d1
parent22bf045c9a5194001b1d52c094094cf8926823a1 (diff)
downloadtinygo-1154212c15e6e97048e122068730dab5a1a9427f.tar.gz
tinygo-1154212c15e6e97048e122068730dab5a1a9427f.zip
chore: fix function names in comment
Signed-off-by: hongkuang <[email protected]>
-rw-r--r--cgo/cgo_test.go2
-rw-r--r--src/machine/machine_atsamd21.go2
-rw-r--r--src/machine/machine_atsamd51.go2
-rw-r--r--src/os/tempfile.go2
-rw-r--r--src/reflect/type.go2
-rw-r--r--src/sync/mutex_test.go2
6 files changed, 6 insertions, 6 deletions
diff --git a/cgo/cgo_test.go b/cgo/cgo_test.go
index 5425d2779..60af3e6f2 100644
--- a/cgo/cgo_test.go
+++ b/cgo/cgo_test.go
@@ -216,7 +216,7 @@ func (i simpleImporter) Import(path string) (*types.Package, error) {
}
}
-// formatDiagnostics formats the error message to be an indented comment. It
+// formatDiagnostic formats the error message to be an indented comment. It
// also fixes Windows path name issues (backward slashes).
func formatDiagnostic(err error) string {
msg := err.Error()
diff --git a/src/machine/machine_atsamd21.go b/src/machine/machine_atsamd21.go
index b6cd85062..755bedf9a 100644
--- a/src/machine/machine_atsamd21.go
+++ b/src/machine/machine_atsamd21.go
@@ -1657,7 +1657,7 @@ var pinTimerMapping = [...]uint8{
PB30 / 2: pinTCC0Ch0 | pinTCC1Ch2<<4,
}
-// findPinPadMapping returns the pin mode (PinTCC or PinTCCAlt) and the channel
+// findPinTimerMapping returns the pin mode (PinTCC or PinTCCAlt) and the channel
// number for a given timer and pin. A zero PinMode is returned if no mapping
// could be found.
func findPinTimerMapping(timer uint8, pin Pin) (PinMode, uint8) {
diff --git a/src/machine/machine_atsamd51.go b/src/machine/machine_atsamd51.go
index d77041741..fdc368a63 100644
--- a/src/machine/machine_atsamd51.go
+++ b/src/machine/machine_atsamd51.go
@@ -1928,7 +1928,7 @@ var pinTimerMapping = [...]struct{ F, G uint8 }{
PB02 / 2: {pinTCC2_2, 0},
}
-// findPinPadMapping returns the pin mode (PinTCCF or PinTCCG) and the channel
+// findPinTimerMapping returns the pin mode (PinTCCF or PinTCCG) and the channel
// number for a given timer and pin. A zero PinMode is returned if no mapping
// could be found.
func findPinTimerMapping(timer uint8, pin Pin) (PinMode, uint8) {
diff --git a/src/os/tempfile.go b/src/os/tempfile.go
index 383d4c181..5a94a6e2a 100644
--- a/src/os/tempfile.go
+++ b/src/os/tempfile.go
@@ -142,7 +142,7 @@ func joinPath(dir, name string) string {
return dir + string(PathSeparator) + name
}
-// LastIndexByte from the strings package.
+// lastIndex from the strings package.
func lastIndex(s string, sep byte) int {
for i := len(s) - 1; i >= 0; i-- {
if s[i] == sep {
diff --git a/src/reflect/type.go b/src/reflect/type.go
index 56d4767f7..1356f67cd 100644
--- a/src/reflect/type.go
+++ b/src/reflect/type.go
@@ -980,7 +980,7 @@ func (t *rawType) Comparable() bool {
return (t.meta & flagComparable) == flagComparable
}
-// isbinary() returns if the hashmapAlgorithmBinary functions can be used on this type
+// isBinary returns if the hashmapAlgorithmBinary functions can be used on this type
func (t *rawType) isBinary() bool {
return (t.meta & flagIsBinary) == flagIsBinary
}
diff --git a/src/sync/mutex_test.go b/src/sync/mutex_test.go
index accb01c97..1e398e5ac 100644
--- a/src/sync/mutex_test.go
+++ b/src/sync/mutex_test.go
@@ -196,7 +196,7 @@ func TestRWMutexWriteToRead(t *testing.T) {
}
}
-// TestRWMutexWriteToRead tests the transition from a read lock to a write lock while contended.
+// TestRWMutexReadToWrite tests the transition from a read lock to a write lock while contended.
func TestRWMutexReadToWrite(t *testing.T) {
// Create a new RWMutex and read-lock it several times.
const n = 3