Skip to content

Commit cc3f79d

Browse files
authored
Fixed most typos (#301)
* Fixed most spelling mistakes * Update README files with new playground links for updated source files
1 parent d515a0c commit cc3f79d

File tree

28 files changed

+56
-56
lines changed

28 files changed

+56
-56
lines changed

tools/mpl/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func process(mdFile string) error {
8787
log.Fatalf("ERROR: Generating Link Title[%s] ScrFile[%s] : %v", title, srcFile, err)
8888
}
8989

90-
// Generate the link information to replace the existing link infomation
90+
// Generate the link information to replace the existing link information
9191
// in the markdown file.
9292
l := fmt.Sprintf("[%s](%s) ([Go Playground](%s))", title, srcFile, playLink)
9393
log.Println("UPDATE:", l)

topics/go/algorithms/data/queue/queue_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
const succeed = "\u2713"
1111
const failed = "\u2717"
1212

13-
// TestNew vaidates the New functionality.
13+
// TestNew validates the New functionality.
1414
func TestNew(t *testing.T) {
1515
t.Log("Given the need to test New functionality.")
1616
{
@@ -33,12 +33,12 @@ func TestNew(t *testing.T) {
3333
}
3434
}
3535

36-
// TestEnqueue vaidates the Enqueue functionality.
36+
// TestEnqueue validates the Enqueue functionality.
3737
func TestEnqueue(t *testing.T) {
3838
t.Log("Given the need to test Enqueue functionality.")
3939
{
4040
const items = 5
41-
t.Logf("\tTest 0:\tWhen enqueing %d items", items)
41+
t.Logf("\tTest 0:\tWhen enqueuing %d items", items)
4242
{
4343
q, err := queue.New(items)
4444
if err != nil {
@@ -80,12 +80,12 @@ func TestEnqueue(t *testing.T) {
8080
}
8181
}
8282

83-
// TestDequeue vaidates the Dequeue functionality.
83+
// TestDequeue validates the Dequeue functionality.
8484
func TestDequeue(t *testing.T) {
8585
t.Log("Given the need to test Dequeue functionality.")
8686
{
8787
const items = 5
88-
t.Logf("\tTest 0:\tWhen dequeing %d items", items)
88+
t.Logf("\tTest 0:\tWhen dequeuing %d items", items)
8989
{
9090
q, err := queue.New(items)
9191
if err != nil {
@@ -126,12 +126,12 @@ func TestDequeue(t *testing.T) {
126126
}
127127
}
128128

129-
// TestEnqueueFull vaidates the Enqueue functionality when full.
129+
// TestEnqueueFull validates the Enqueue functionality when full.
130130
func TestEnqueueFull(t *testing.T) {
131131
t.Log("Given the need to test Enqueue functionality for being full.")
132132
{
133133
const items = 5
134-
t.Logf("\tTest 0:\tWhen enqueing %d items", items)
134+
t.Logf("\tTest 0:\tWhen enqueuing %d items", items)
135135
{
136136
q, err := queue.New(items)
137137
if err != nil {
@@ -185,12 +185,12 @@ func TestEnqueueFull(t *testing.T) {
185185
}
186186
}
187187

188-
// TestDequeueEmpty vaidates the Dequeue functionality when empty.
188+
// TestDequeueEmpty validates the Dequeue functionality when empty.
189189
func TestDequeueEmpty(t *testing.T) {
190190
t.Log("Given the need to test Dequeue functionality for being empty.")
191191
{
192192
const items = 5
193-
t.Logf("\tTest 0:\tWhen enqueing %d items", items)
193+
t.Logf("\tTest 0:\tWhen enqueuing %d items", items)
194194
{
195195
q, err := queue.New(items)
196196
if err != nil {

topics/go/algorithms/data/queue/student/queue_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
const succeed = "\u2713"
1111
const failed = "\u2717"
1212

13-
// TestNew vaidates the New functionality.
13+
// TestNew validates the New functionality.
1414
func TestNew(t *testing.T) {
1515
t.Log("Given the need to test New functionality.")
1616
{
@@ -33,12 +33,12 @@ func TestNew(t *testing.T) {
3333
}
3434
}
3535

36-
// TestEnqueue vaidates the Enqueue functionality.
36+
// TestEnqueue validates the Enqueue functionality.
3737
func TestEnqueue(t *testing.T) {
3838
t.Log("Given the need to test Enqueue functionality.")
3939
{
4040
const items = 5
41-
t.Logf("\tTest 0:\tWhen enqueing %d items", items)
41+
t.Logf("\tTest 0:\tWhen enqueuing %d items", items)
4242
{
4343
q, err := queue.New(items)
4444
if err != nil {
@@ -80,12 +80,12 @@ func TestEnqueue(t *testing.T) {
8080
}
8181
}
8282

83-
// TestDequeue vaidates the Dequeue functionality.
83+
// TestDequeue validates the Dequeue functionality.
8484
func TestDequeue(t *testing.T) {
8585
t.Log("Given the need to test Dequeue functionality.")
8686
{
8787
const items = 5
88-
t.Logf("\tTest 0:\tWhen dequeing %d items", items)
88+
t.Logf("\tTest 0:\tWhen dequeuing %d items", items)
8989
{
9090
q, err := queue.New(items)
9191
if err != nil {
@@ -126,12 +126,12 @@ func TestDequeue(t *testing.T) {
126126
}
127127
}
128128

129-
// TestEnqueueFull vaidates the Enqueue functionality when full.
129+
// TestEnqueueFull validates the Enqueue functionality when full.
130130
func TestEnqueueFull(t *testing.T) {
131131
t.Log("Given the need to test Enqueue functionality for being full.")
132132
{
133133
const items = 5
134-
t.Logf("\tTest 0:\tWhen enqueing %d items", items)
134+
t.Logf("\tTest 0:\tWhen enqueuing %d items", items)
135135
{
136136
q, err := queue.New(items)
137137
if err != nil {
@@ -185,12 +185,12 @@ func TestEnqueueFull(t *testing.T) {
185185
}
186186
}
187187

188-
// TestDequeueEmpty vaidates the Dequeue functionality when empty.
188+
// TestDequeueEmpty validates the Dequeue functionality when empty.
189189
func TestDequeueEmpty(t *testing.T) {
190190
t.Log("Given the need to test Dequeue functionality for being empty.")
191191
{
192192
const items = 5
193-
t.Logf("\tTest 0:\tWhen enqueing %d items", items)
193+
t.Logf("\tTest 0:\tWhen enqueuing %d items", items)
194194
{
195195
q, err := queue.New(items)
196196
if err != nil {

topics/go/algorithms/data/stack/stack_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
const succeed = "\u2713"
1111
const failed = "\u2717"
1212

13-
// TestPush vaidates the Push functionality.
13+
// TestPush validates the Push functionality.
1414
func TestPush(t *testing.T) {
1515
t.Log("Given the need to test Push functionality.")
1616
{
@@ -51,7 +51,7 @@ func TestPush(t *testing.T) {
5151
}
5252
}
5353

54-
// TestPop vaidates the Pop functionality.
54+
// TestPop validates the Pop functionality.
5555
func TestPop(t *testing.T) {
5656
t.Log("Given the need to test Pop functionality.")
5757
{
@@ -101,7 +101,7 @@ func TestPop(t *testing.T) {
101101
}
102102
}
103103

104-
// TestPeek vaidates the Peek functionality.
104+
// TestPeek validates the Peek functionality.
105105
func TestPeek(t *testing.T) {
106106
t.Log("Given the need to test Peek functionality.")
107107
{

topics/go/algorithms/data/stack/student/stack_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
const succeed = "\u2713"
1111
const failed = "\u2717"
1212

13-
// TestPush vaidates the Push functionality.
13+
// TestPush validates the Push functionality.
1414
func TestPush(t *testing.T) {
1515
t.Log("Given the need to test Push functionality.")
1616
{
@@ -51,7 +51,7 @@ func TestPush(t *testing.T) {
5151
}
5252
}
5353

54-
// TestPop vaidates the Pop functionality.
54+
// TestPop validates the Pop functionality.
5555
func TestPop(t *testing.T) {
5656
t.Log("Given the need to test Pop functionality.")
5757
{
@@ -101,7 +101,7 @@ func TestPop(t *testing.T) {
101101
}
102102
}
103103

104-
// TestPeek vaidates the Peek functionality.
104+
// TestPeek validates the Peek functionality.
105105
func TestPeek(t *testing.T) {
106106
t.Log("Given the need to test Peek functionality.")
107107
{

topics/go/algorithms/fun/vlq/student/vlq.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package vlq
22

3-
// DecodeVarint takes a varaible length VLQ based integer and
3+
// DecodeVarint takes a variable length VLQ based integer and
44
// decodes it into a 32 bit integer.
55
func DecodeVarint(input []byte) (uint32, error) {
66
return 0, nil

topics/go/algorithms/fun/vlq/vlq.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"math/bits"
66
)
77

8-
// DecodeVarint takes a varaible length VLQ based integer and
8+
// DecodeVarint takes a variable length VLQ based integer and
99
// decodes it into a 32 bit integer.
1010
func DecodeVarint(input []byte) (uint32, error) {
1111
const lastBitSet = 0x80 // 1000 0000

topics/go/concurrency/data_race/advanced/example1/example1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// http://www.apache.org/licenses/LICENSE-2.0
33

44
// Sample program to show a more complicated race condition using
5-
// an interface value. This produces a read to an inteface value after
5+
// an interface value. This produces a read to an interface value after
66
// a partial write.
77
package main
88

topics/go/concurrency/patterns/chat/chat.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"sync"
1414
)
1515

16-
// temporary is declared to test for the existance of the method coming
16+
// temporary is declared to test for the existence of the method coming
1717
// from the net package.
1818
type temporary interface {
1919
Temporary() bool
@@ -35,7 +35,7 @@ type client struct {
3535
conn net.Conn
3636
}
3737

38-
// read waits for message and sends it to the chatroom for procesing.
38+
// read waits for message and sends it to the chatroom for processing.
3939
func (c *client) read() {
4040
for {
4141

topics/go/exercises/contributors/githubmock/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
5555
func main() {
5656

5757
// Start listening for local traffic on port 0 which tells the OS to pick a
58-
// random open port. We start the listener seperately from the server so we
58+
// random open port. We start the listener separately from the server so we
5959
// can report the listener's address.
6060
listener, err := net.Listen("tcp", "127.0.0.1:0")
6161
if err != nil {

topics/go/language/embedding/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Embedding types provide the final piece of sharing and reusing state and behavio
2828

2929
Copy the code from the template. Add a new type CachingFeed which embeds Feed and overrides the Fetch method.
3030

31-
[Template](exercises/template1/template1.go) ([Go Playground](https://play.golang.org/p/kdHgALCIPIs)) |
32-
[Answer](exercises/exercise1/exercise1.go) ([Go Playground](https://play.golang.org/p/FbvPJoQc4In))
31+
[Template](exercises/template1/template1.go) ([Go Playground](https://play.golang.org/p/_SnIBh3H-0O)) |
32+
[Answer](exercises/exercise1/exercise1.go) ([Go Playground](https://play.golang.org/p/yHFpf7QYtnc))
3333
___
3434
All material is licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0).

topics/go/language/embedding/exercises/exercise1/exercise1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type CachingFeed struct {
4848
*Feed
4949
}
5050

51-
// NewCachingFeed initalizes a CachingFeed for use.
51+
// NewCachingFeed initializes a CachingFeed for use.
5252
func NewCachingFeed(f *Feed) *CachingFeed {
5353
return &CachingFeed{
5454
docs: make(map[string]Document),

topics/go/language/embedding/exercises/template1/template1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ type CachingFeed struct {
7474
// TODO embed *Feed and add a field for a map[string]Document.
7575
}
7676

77-
// NewCachingFeed initalizes a CachingFeed for use.
77+
// NewCachingFeed initializes a CachingFeed for use.
7878
func NewCachingFeed(f *Feed) *CachingFeed {
7979

8080
// TODO create a CachingFeed with an initialized map and embedded feed.

topics/go/language/methods/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ _"Methods are valid when it is practical or reasonable for a piece of data to ex
2121

2222
## Code Review
2323

24-
[Declare and receiver behavior](example1/example1.go) ([Go Playground](https://play.golang.org/p/9ZBYDPHs_pT))
24+
[Declare and receiver behavior](example1/example1.go) ([Go Playground](https://play.golang.org/p/-rK206XfGaV))
2525
[Value and Pointer semantics](example5/example5.go) ([Go Playground](https://play.golang.org/p/QmKfZAnZ6FQ))
2626
[Named typed methods](example2/example2.go) ([Go Playground](https://play.golang.org/p/9g1PIjyA2YQ))
2727
[Function/Method variables](example3/example3.go) ([Go Playground](https://play.golang.org/p/iRkiczvcHiH))

topics/go/language/methods/example1/example1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func main() {
5454
}
5555

5656
// Exception example: Using pointer semantics
57-
// for a collectoin of strings.
57+
// for a collection of strings.
5858
keys := make([]string, 10)
5959
for i := range keys {
6060
keys[i] = func() string { return "key-gen" }()

topics/go/packages/context/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Context - Standard Library
22

3-
The package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
3+
The package context defines the Context type, which carries deadlines, cancellation signals, and other request-scoped values across API boundaries and between processes.
44

55
## Notes
66

@@ -38,7 +38,7 @@ The package context defines the Context type, which carries deadlines, cancelati
3838

3939
Use the template and follow the directions. You will be writing a web handler that performs a mock database call but will timeout based on a context if the call takes too long. You will also save state into the context.
4040

41-
[Template](exercises/template1/template1.go) ([Go Playground](https://play.golang.org/p/QHvoTQjD1BZ)) |
42-
[Answer](exercises/exercise1/exercise1.go) ([Go Playground](https://play.golang.org/p/yc7W3nVnQpM))
41+
[Template](exercises/template1/template1.go) ([Go Playground](https://play.golang.org/p/jIkgYBhqMNy)) |
42+
[Answer](exercises/exercise1/exercise1.go) ([Go Playground](https://play.golang.org/p/eJamC6Aleu5))
4343
___
4444
All material is licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0).

topics/go/packages/context/exercises/exercise1/exercise1.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func routes() {
4343
// findUser makes a database call to find a user.
4444
func findUser(rw http.ResponseWriter, r *http.Request) {
4545

46-
// Create a context that timesout in fifty milliseconds.
46+
// Create a context that timeouts in fifty milliseconds.
4747
ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond)
4848
defer cancel()
4949

@@ -57,7 +57,7 @@ func findUser(rw http.ResponseWriter, r *http.Request) {
5757
ch := make(chan *User, 1)
5858
go func() {
5959

60-
// Get the ip adress from the context for logging.
60+
// Get the ip address from the context for logging.
6161
if ip, ok := ctx.Value(userIPKey).(string); ok {
6262
log.Println("Start DB for IP", ip)
6363
}
@@ -72,7 +72,7 @@ func findUser(rw http.ResponseWriter, r *http.Request) {
7272
select {
7373
case u := <-ch:
7474

75-
// Repond with the user.
75+
// Respond with the user.
7676
sendResponse(rw, &u, http.StatusOK)
7777
log.Println("Sent StatusOK")
7878
return

topics/go/packages/context/exercises/template1/template1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func routes() {
3232
// both timeouts and state.
3333
func findUser(rw http.ResponseWriter, r *http.Request) {
3434

35-
// Create a context that timesout in fifty milliseconds.
35+
// Create a context that timeouts in fifty milliseconds.
3636

3737
// Defer the call to cancel.
3838

topics/go/packages/encoding/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Encoding is the process or marshaling or unmarshaling data into different forms.
44

55
## Notes
66

7-
* Support for Decoding and Encoding JSON and XML are provided by the standard libary.
7+
* Support for Decoding and Encoding JSON and XML are provided by the standard library.
88
* This package gets better and better with every release.
99

1010
## Links
@@ -13,7 +13,7 @@ Encoding is the process or marshaling or unmarshaling data into different forms.
1313

1414
## Code Review
1515

16-
[Unmarshal JSON documents](example1/example1.go) ([Go Playground](https://play.golang.org/p/Wvfx1eIBDT0))
16+
[Unmarshal JSON documents](example1/example1.go) ([Go Playground](https://play.golang.org/p/hCWu2AbC9KP))
1717
[Unmarshal JSON files](example2/example2.go) ([Go Playground](https://play.golang.org/p/g5-AUzfbcUS))
1818
[Marshal a user defined type](example3/example3.go) ([Go Playground](https://play.golang.org/p/B01KAwC-rpX))
1919
[Custom Marshaler and Unmarshler](example4/example4.go) ([Go Playground](https://play.golang.org/p/SolgBvtnBUr))

topics/go/packages/encoding/example1/example1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type (
3838
CurrencyCode string `json:"currency_code"`
3939
TimeZone string `json:"time_zone"`
4040
NumberFormat struct {
41-
DecimalSaparator string `json:"decimal_separator"`
41+
DecimalSeparator string `json:"decimal_separator"`
4242
GroupingSeparator string `json:"grouping_separator"`
4343
GroupPattern string `json:"group_pattern"`
4444
} `json:"number_format"`

topics/go/packages/reflection/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Example shows how to use reflection to decode an integer.
4646
### Exercise 1
4747
Declare a struct type that represents a request for a customer invoice. Include a CustomerID and InvoiceID field. Define tags that can be used to validate the request. Define tags that specify both the length and range for the ID to be valid. Declare a function named validate that accepts values of any type and processes the tags. Display the results of the validation.
4848

49-
[Template](exercises/template1/template1.go) ([Go Playground](https://play.golang.org/p/3kcRgtNZe9Q)) |
50-
[Answer](exercises/exercise1/exercise1.go) ([Go Playground](https://play.golang.org/p/kD9nQMYjPI5))
49+
[Template](exercises/template1/template1.go) ([Go Playground](https://play.golang.org/p/yUhGiGNC23V)) |
50+
[Answer](exercises/exercise1/exercise1.go) ([Go Playground](https://play.golang.org/p/ZgxnHRIe2M8))
5151
___
5252
All material is licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0).

topics/go/packages/reflection/exercises/exercise1/exercise1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Declare a struct type that represents a request for a customer invoice. Include a CustomerID and InvoiceID field. Define
55
// tags that can be used to validate the request. Define tags that specify both the length and range for the ID to be valid.
6-
// Declare a function named validate that accepts values of any type and processes the tags. Display the resutls of the validation.
6+
// Declare a function named validate that accepts values of any type and processes the tags. Display the results of the validation.
77
package main
88

99
import (

0 commit comments

Comments
 (0)