Skip to content

Commit 001bae3

Browse files
committed
go.mod: use updated misspell. GNUmakefile: add spellfix target, use it.
1 parent bd7f2ca commit 001bae3

38 files changed

+56
-51
lines changed

GNUmakefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,9 @@ lint:
969969
go run github.com/mgechev/revive -config revive.toml compiler/... src/{os,reflect}/*.go | grep -v "should have comment or be unexported" | grep '.' | awk '{print}; END {exit NR>0}'
970970

971971
.PHONY: spell
972-
spell:
973-
# Check for typos in comments. Skip git submodules etc.
974-
go run github.com/client9/misspell/cmd/misspell -i 'ackward,devided,extint,rela' $$( find . -depth 1 -type d | egrep -w -v 'lib|llvm|src/net' )
972+
spell: ## Check for typos in strings and comments. Skip git submodules etc.
973+
# Original repo for misspell was github.com/client9/misspell
974+
# Most up to date repo seems to be github.com/golangci/misspell
975+
go run github.com/golangci/misspell/cmd/misspell -i 'ackward,devided,extint,rela' $$( find . -depth 1 -type d | egrep -w -v '.git|lib|llvm|src/net' )
976+
spellfix: ## Fix typos in strings and comments.
977+
go run github.com/golangci/misspell/cmd/misspell -w -i 'ackward,devided,extint,rela' $$( find . -depth 1 -type d | egrep -w -v '.git|lib|llvm|src/net' )

builder/ar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/blakesmith/ar"
1717
)
1818

19-
// makeArchive creates an arcive for static linking from a list of object files
19+
// makeArchive creates an archive for static linking from a list of object files
2020
// given as a parameter. It is equivalent to the following command:
2121
//
2222
// ar -rcs <archivePath> <objs...>

compileopts/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (c *Config) GOOS() string {
6060
}
6161

6262
// GOARCH returns the GOARCH of the target. This might not always be the actual
63-
// archtecture: for example, the AVR target is not supported by the Go standard
63+
// architecture: for example, the AVR target is not supported by the Go standard
6464
// library so such targets will usually pretend to be linux/arm.
6565
func (c *Config) GOARCH() string {
6666
return c.Target.GOARCH

compiler/asserts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (b *builder) createUnsafeSliceStringCheck(name string, ptr, len llvm.Value,
9999
// However, in practice, it is also necessary to check that the length is
100100
// not too big that a GEP wouldn't be possible without wrapping the pointer.
101101
// These two checks (non-negative and not too big) can be merged into one
102-
// using an unsiged greater than.
102+
// using an unsigned greater than.
103103

104104
// Make sure the len value is at least as big as a uintptr.
105105
len = b.extendInteger(len, lenType, b.uintptrType)

compiler/compiler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func NewTargetMachine(config *Config) (llvm.TargetMachine, error) {
242242
}
243243

244244
// Sizes returns a types.Sizes appropriate for the given target machine. It
245-
// includes the correct int size and aligment as is necessary for the Go
245+
// includes the correct int size and allignment as is necessary for the Go
246246
// typechecker.
247247
func Sizes(machine llvm.TargetMachine) types.Sizes {
248248
targetData := machine.CreateTargetData()

compiler/gc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (b *builder) trackValue(value llvm.Value) {
7878
}
7979
}
8080

81-
// trackPointer creates a call to runtime.trackPointer, bitcasting the poitner
81+
// trackPointer creates a call to runtime.trackPointer, bitcasting the pointer
8282
// first if needed. The input value must be of LLVM pointer type.
8383
func (b *builder) trackPointer(value llvm.Value) {
8484
b.createRuntimeCall("trackPointer", []llvm.Value{value, b.stackChainAlloca}, "")

compiler/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (b *builder) createMakeInterface(val llvm.Value, typ types.Type, pos token.
8686

8787
// extractValueFromInterface extract the value from an interface value
8888
// (runtime._interface) under the assumption that it is of the type given in
89-
// llvmType. The behavior is undefied if the interface is nil or llvmType
89+
// llvmType. The behavior is undefined if the interface is nil or llvmType
9090
// doesn't match the underlying type of the interface.
9191
func (b *builder) extractValueFromInterface(itf llvm.Value, llvmType llvm.Type) llvm.Value {
9292
valuePtr := b.CreateExtractValue(itf, 1, "typeassert.value.ptr")

compiler/llvm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ func (c *compilerContext) getPointerBitmap(typ llvm.Type, pos token.Pos) *big.In
418418
}
419419
}
420420

421-
// archFamily returns the archtecture from the LLVM triple but with some
421+
// archFamily returns the architecture from the LLVM triple but with some
422422
// architecture names ("armv6", "thumbv7m", etc) merged into a single
423423
// architecture name ("arm").
424424
func (c *compilerContext) archFamily() string {

compiler/map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ func (b *builder) zeroUndefBytes(llvmType llvm.Type, ptr llvm.Value) error {
326326
if i < numFields-1 {
327327
nextOffset = b.targetData.ElementOffset(llvmStructType, i+1)
328328
} else {
329-
// Last field? Next offset is the total size of the allcoate struct.
329+
// Last field? Next offset is the total size of the allocate struct.
330330
nextOffset = b.targetData.TypeAllocSize(llvmStructType)
331331
}
332332

compiler/syscall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (b *builder) createRawSyscall(call *ssa.CallCommon) (llvm.Value, error) {
145145
// Also useful:
146146
// https://web.archive.org/web/20220529105937/https://www.linux-mips.org/wiki/Syscall
147147
// The syscall number goes in r2, the result also in r2.
148-
// Register r7 is both an input paramter and an output parameter: if it
148+
// Register r7 is both an input parameter and an output parameter: if it
149149
// is non-zero, the system call failed and r2 is the error code.
150150
// The code below implements the O32 syscall ABI, not the N32 ABI. It
151151
// could implement both at the same time if needed (like what appears to

diagnostics/diagnostics.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func CreateDiagnostics(err error) ProgramDiagnostic {
4343
if err == nil {
4444
return nil
4545
}
46-
// Right now, the compiler will only show errors for the first pacakge that
46+
// Right now, the compiler will only show errors for the first package that
4747
// fails to build. This is likely to change in the future.
4848
return ProgramDiagnostic{
4949
createPackageDiagnostic(err),
@@ -147,7 +147,7 @@ func createDiagnostics(err error) []Diagnostic {
147147
// last package
148148
fmt.Fprintln(buf, "\timports", pkgPath+": "+err.Err.Error())
149149
} else {
150-
// not the last pacakge
150+
// not the last package
151151
fmt.Fprintln(buf, "\timports", pkgPath)
152152
}
153153
}

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ module github.com/tinygo-org/tinygo
22

33
go 1.19
44

5+
// until https://github.com/golangci/misspell/pull/22 is accepted (and a new release is tagged?)
6+
replace github.com/golangci/misspell => github.com/dkegel-fastly/misspell v0.0.0-20240806032307-43cd8cce7390
7+
58
require (
69
github.com/aykevl/go-wasm v0.0.2-0.20240312204833-50275154210c
710
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2
811
github.com/chromedp/cdproto v0.0.0-20220113222801-0725d94bb6ee
912
github.com/chromedp/chromedp v0.7.6
10-
github.com/client9/misspell v0.3.4
1113
github.com/gofrs/flock v0.8.1
14+
github.com/golangci/misspell v0.3.4
1215
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
1316
github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf
1417
github.com/marcinbor85/gohex v0.0.0-20200531091804-343a4b548892
@@ -17,7 +20,6 @@ require (
1720
github.com/mgechev/revive v1.3.7
1821
github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3
1922
go.bug.st/serial v1.6.0
20-
golang.org/x/net v0.26.0
2123
golang.org/x/sys v0.21.0
2224
golang.org/x/tools v0.22.1-0.20240621165957-db513b091504
2325
gopkg.in/yaml.v2 v2.4.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ github.com/chromedp/chromedp v0.7.6 h1:2juGaktzjwULlsn+DnvIZXFUckEp5xs+GOBroaea+
1313
github.com/chromedp/chromedp v0.7.6/go.mod h1:ayT4YU/MGAALNfOg9gNrpGSAdnU51PMx+FCeuT1iXzo=
1414
github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic=
1515
github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
16-
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
17-
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
1816
github.com/creack/goselect v0.1.2 h1:2DNy14+JPjRBgPzAd1thbQp4BSIihxcBf0IXhQXDRa0=
1917
github.com/creack/goselect v0.1.2/go.mod h1:a/NhLweNvqIYMuxcMOuWY516Cimucms3DglDzQP3hKY=
2018
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2119
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2220
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
21+
github.com/dkegel-fastly/misspell v0.0.0-20240806032307-43cd8cce7390 h1:lbVRaNxRZPfO4H1jZxTRScgKFVP1a6cHmeNz/DUubaE=
22+
github.com/dkegel-fastly/misspell v0.0.0-20240806032307-43cd8cce7390/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo=
2323
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
2424
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
2525
github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
@@ -83,9 +83,9 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
8383
go.bug.st/serial v1.6.0 h1:mAbRGN4cKE2J5gMwsMHC2KQisdLRQssO9WSM+rbZJ8A=
8484
go.bug.st/serial v1.6.0/go.mod h1:UABfsluHAiaNI+La2iESysd9Vetq7VRdpxvjx7CmmOE=
8585
golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
86-
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
87-
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
86+
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
8887
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
88+
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
8989
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
9090
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
9191
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

internal/tools/tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package tools
66

77
import (
8-
_ "github.com/client9/misspell"
8+
_ "github.com/golangci/misspell"
99
_ "github.com/mgechev/revive"
1010
)
1111

interp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ All in all, this design provides several benefits:
2828
it should be a whole lot faster for loops as it doesn't have to call into
2929
LLVM (via CGo) for every operation.
3030

31-
As mentioned, this partial evaulator comes in three parts: a compiler, an
31+
As mentioned, this partial evaluator comes in three parts: a compiler, an
3232
interpreter, and a memory manager.
3333

3434
## Compiler

src/crypto/rand/rand_arc4random.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This implementation of crypto/rand uses the arc4random_buf function
44
// (available on both MacOS and WASI) to generate random numbers.
55
//
6-
// Note: arc4random_buf (unlike what the name suggets) does not use the insecure
6+
// Note: arc4random_buf (unlike what the name suggests) does not use the insecure
77
// RC4 cipher. Instead, it uses a high-quality cipher, varying by the libc
88
// implementation.
99

src/crypto/tls/tls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ type Dialer struct {
101101
//
102102
// The returned Conn, if any, will always be of type *Conn.
103103
func (d *Dialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) {
104-
return nil, errors.New("tls:DialContext not implmented")
104+
return nil, errors.New("tls:DialContext not implemented")
105105
}
106106

107107
// LoadX509KeyPair reads and parses a public/private key pair from a pair

src/internal/wasi/clocks/v0.2.0/monotonic-clock/monotonic-clock.wit.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/wasi/io/v0.2.0/streams/streams.wit.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/machine/machine_atmega1280.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func (pwm PWM) Configure(config PWMConfig) error {
180180
// Set the PWM mode to fast PWM (mode = 3).
181181
avr.TCCR0A.Set(avr.TCCR0A_WGM00 | avr.TCCR0A_WGM01)
182182
// monotonic timer is using the same time as PWM:0
183-
// we must adust internal settings of monotonic timer when PWM:0 settings changed
183+
// we must adjust internal settings of monotonic timer when PWM:0 settings changed
184184
adjustMonotonicTimer()
185185
} else {
186186
avr.TCCR2B.Set(prescaler)
@@ -718,7 +718,7 @@ func (pwm PWM) Set(channel uint8, value uint32) {
718718
}
719719
}
720720
// monotonic timer is using the same time as PWM:0
721-
// we must adust internal settings of monotonic timer when PWM:0 settings changed
721+
// we must adjust internal settings of monotonic timer when PWM:0 settings changed
722722
adjustMonotonicTimer()
723723
case 1:
724724
mask := interrupt.Disable()

src/machine/machine_atmega328.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (pwm PWM) Configure(config PWMConfig) error {
5656
// Set the PWM mode to fast PWM (mode = 3).
5757
avr.TCCR0A.Set(avr.TCCR0A_WGM00 | avr.TCCR0A_WGM01)
5858
// monotonic timer is using the same time as PWM:0
59-
// we must adust internal settings of monotonic timer when PWM:0 settings changed
59+
// we must adjust internal settings of monotonic timer when PWM:0 settings changed
6060
adjustMonotonicTimer()
6161
} else {
6262
avr.TCCR2B.Set(prescaler)
@@ -385,7 +385,7 @@ func (pwm PWM) Set(channel uint8, value uint32) {
385385
}
386386
}
387387
// monotonic timer is using the same time as PWM:0
388-
// we must adust internal settings of monotonic timer when PWM:0 settings changed
388+
// we must adjust internal settings of monotonic timer when PWM:0 settings changed
389389
adjustMonotonicTimer()
390390
case 1:
391391
mask := interrupt.Disable()

src/machine/machine_esp32c3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ func (uart *UART) enableTransmitter() {
480480
uart.Bus.SetCONF0_TXFIFO_RST(0)
481481
// TXINFO empty threshold is when txfifo_empty_int interrupt produced after the amount of data in Tx-FIFO is less than this register value.
482482
uart.Bus.SetCONF1_TXFIFO_EMPTY_THRHD(uart_empty_thresh_default)
483-
// we are not using interrut on TX since write we are waiting for FIFO to have space.
483+
// we are not using interrupt on TX since write we are waiting for FIFO to have space.
484484
// uart.Bus.INT_ENA.SetBits(esp.UART_INT_ENA_TXFIFO_EMPTY_INT_ENA)
485485
}
486486

src/machine/machine_mimxrt1062.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ func (p Pin) getGPIO() (norm *nxp.GPIO_Type, fast *nxp.GPIO_Type) {
451451
}
452452
}
453453

454-
// getPad returns both the pad and mux configration registers for a given Pin.
454+
// getPad returns both the pad and mux configuration registers for a given Pin.
455455
func (p Pin) getPad() (pad *volatile.Register32, mux *volatile.Register32) {
456456
switch p.getPort() {
457457
case portA:

src/machine/machine_rp2040_i2c.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var (
2424
// here: https://github.com/vmilea/pico_i2c_slave
2525

2626
// Features: Taken from datasheet.
27-
// Default controller mode, with target mode available (not simulataneously).
27+
// Default controller mode, with target mode available (not simultaneously).
2828
// Default target address of RP2040: 0x055
2929
// Supports 10-bit addressing in controller mode
3030
// 16-element transmit buffer

src/machine/machine_stm32f103.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ func (i2c *I2C) getFreqRange(config I2CConfig) uint32 {
399399
// pclk1 clock speed is main frequency divided by PCLK1 prescaler (div 2)
400400
pclk1 := CPUFrequency() / 2
401401

402-
// set freqency range to PCLK1 clock speed in MHz
402+
// set frequency range to PCLK1 clock speed in MHz
403403
// aka setting the value 36 means to use 36 MHz clock
404404
return pclk1 / 1000000
405405
}

src/machine/machine_stm32l0.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ func (spi SPI) getBaudRate(config SPIConfig) uint32 {
256256
}
257257

258258
// set frequency dependent on PCLK prescaler. Since these are rather weird
259-
// speeds due to the CPU freqency, pick a range up to that frquency for
259+
// speeds due to the CPU frequency, pick a range up to that frequency for
260260
// clients to use more human-understandable numbers, e.g. nearest 100KHz
261261

262-
// These are based on APB2 clock frquency (84MHz on the discovery board)
262+
// These are based on APB2 clock frequency (84MHz on the discovery board)
263263
// TODO: also include the MCU/APB clock setting in the equation
264264
switch {
265265
case localFrequency < 328125:

src/machine/machine_stm32l4.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ func (spi SPI) getBaudRate(config SPIConfig) uint32 {
327327
localFrequency := config.Frequency
328328

329329
// set frequency dependent on PCLK prescaler. Since these are rather weird
330-
// speeds due to the CPU freqency, pick a range up to that frquency for
330+
// speeds due to the CPU frequency, pick a range up to that frequency for
331331
// clients to use more human-understandable numbers, e.g. nearest 100KHz
332332

333-
// These are based on 80MHz peripheral clock frquency
333+
// These are based on 80MHz peripheral clock frequency
334334
switch {
335335
case localFrequency < 312500:
336336
conf = stm32.SPI_CR1_BR_Div256

src/os/os_anyos_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func TestStatBadDir(t *testing.T) {
5656
badDir := filepath.Join(dir, "not-exist/really-not-exist")
5757
_, err := Stat(badDir)
5858
if pe, ok := err.(*fs.PathError); !ok || !IsNotExist(err) || pe.Path != badDir {
59-
t.Errorf("Mkdir error = %#v; want PathError for path %q satisifying IsNotExist", err, badDir)
59+
t.Errorf("Mkdir error = %#v; want PathError for path %q satisfying IsNotExist", err, badDir)
6060
}
6161
}
6262

src/os/tempfile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func TestMkdirTempBadDir(t *testing.T) {
158158
badDir := filepath.Join(dir, "not-exist")
159159
_, err = MkdirTemp(badDir, "foo")
160160
if pe, ok := err.(*fs.PathError); !ok || !IsNotExist(err) || pe.Path != badDir {
161-
t.Errorf("TempDir error = %#v; want PathError for path %q satisifying IsNotExist", err, badDir)
161+
t.Errorf("TempDir error = %#v; want PathError for path %q satisfying IsNotExist", err, badDir)
162162
}
163163
}
164164

src/reflect/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ const (
404404

405405
// The base type struct. All type structs start with this.
406406
type rawType struct {
407-
meta uint8 // metadata byte, contains kind and flags (see contants above)
407+
meta uint8 // metadata byte, contains kind and flags (see constants above)
408408
}
409409

410410
// All types that have an element type: named, chan, slice, array, map (but not

src/reflect/value_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func TestTinyMap(t *testing.T) {
164164
// make sure we can get it out
165165
v2 := refut.MapIndex(ValueOf(unmarshalerText{"x", "y"}))
166166
if !v2.IsValid() || !v2.Bool() {
167-
t.Errorf("Failed to look up map struct key with refection")
167+
t.Errorf("Failed to look up map struct key with reflection")
168168
}
169169

170170
// put in a key with reflection

src/runtime/interrupt/interrupt_avr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func Disable() (state State) {
2727
// Restore restores interrupts to what they were before. Give the previous state
2828
// returned by Disable as a parameter. If interrupts were disabled before
2929
// calling Disable, this will not re-enable interrupts, allowing for nested
30-
// cricital sections.
30+
// critical sections.
3131
func Restore(state State) {
3232
// SREG is at I/O address 0x3f.
3333
device.AsmFull("out 0x3f, {state}", map[string]interface{}{

src/runtime/interrupt/interrupt_cortexm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func Disable() (state State) {
4646
// Restore restores interrupts to what they were before. Give the previous state
4747
// returned by Disable as a parameter. If interrupts were disabled before
4848
// calling Disable, this will not re-enable interrupts, allowing for nested
49-
// cricital sections.
49+
// critical sections.
5050
func Restore(state State) {
5151
arm.EnableInterrupts(uintptr(state))
5252
}

src/runtime/interrupt/interrupt_gameboyadvance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func Disable() (state State) {
9292
// Restore restores interrupts to what they were before. Give the previous state
9393
// returned by Disable as a parameter. If interrupts were disabled before
9494
// calling Disable, this will not re-enable interrupts, allowing for nested
95-
// cricital sections.
95+
// critical sections.
9696
func Restore(state State) {
9797
// Restore interrupts to the previous state.
9898
gba.INTERRUPT.PAUSE.Set(uint16(state))

0 commit comments

Comments
 (0)