Skip to content

Commit aa14392

Browse files
authored
update go wiki link (#723)
1 parent 8f97acf commit aa14392

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you don't feel confident to submit your own guide, submitting an issue for so
2828
* Thinking of examples that showcase what you're trying to teach without confusing the reader with other features is important.
2929
* For example you can learn about `struct`s without understanding pointers.
3030
* Brevity is king.
31-
* Follow the [Code Review Comments style guide](https://github.com/golang/go/wiki/CodeReviewComments). It's important for a consistent style across all the sections.
31+
* Follow the [Code Review Comments style guide](https://go.dev/wiki/CodeReviewComments). It's important for a consistent style across all the sections.
3232
* Your section should have a runnable application at the end \(e.g `package main` with a `main` func\) so users can see it in action and play with it.
3333
* All tests should pass.
3434
* Run `./build.sh` before raising PR.

install-go.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ The official installation instructions for Go are available [here](https://golan
55
## Go Environment
66

77
### Go Modules
8-
Go 1.11 introduced [Modules](https://github.com/golang/go/wiki/Modules). This approach is the default build mode since Go 1.16, therefore the use of `GOPATH` is not recommended.
8+
9+
Go 1.11 introduced [Modules](https://go.dev/wiki/Modules). This approach is the default build mode since Go 1.16, therefore the use of `GOPATH` is not recommended.
910

1011
Modules aim to solve problems related to dependency management, version selection and reproducible builds; they also enable users to run Go code outside of `GOPATH`.
1112

integers.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Integers work as you would expect. Let's write an `Add` function to try things out. Create a test file called `adder_test.go` and write this code.
66

7-
**Note:** Go source files can only have one `package` per directory. Make sure that your files are organised into their own packages. [Here is a good explanation on this.](https://dave.cheney.net/2014/12/01/five-suggestions-for-setting-up-a-go-project)
7+
**Note:** Go source files can only have one `package` per directory. Make sure that your files are organised into their own packages. [Here is a good explanation on this.](https://dave.cheney.net/2014/12/01/five-suggestions-for-setting-up-a-go-project)
88

99
Your project directory might look something like this:
1010

@@ -13,7 +13,7 @@ learnGoWithTests
1313
|
1414
|-> helloworld
1515
| |- hello.go
16-
| |- hello_test.go
16+
| |- hello_test.go
1717
|
1818
|-> integers
1919
| |- adder_test.go
@@ -69,7 +69,7 @@ Now run the tests and we should be happy that the test is correctly reporting wh
6969

7070
`adder_test.go:10: expected '4' but got '0'`
7171

72-
If you have noticed we learnt about _named return value_ in the [last](hello-world.md#one...last...refactor?) section but aren't using the same here. It should generally be used when the meaning of the result isn't clear from context, in our case it's pretty much clear that `Add` function will add the parameters. You can refer [this](https://github.com/golang/go/wiki/CodeReviewComments#named-result-parameters) wiki for more details.
72+
If you have noticed we learnt about _named return value_ in the [last](hello-world.md#one...last...refactor?) section but aren't using the same here. It should generally be used when the meaning of the result isn't clear from context, in our case it's pretty much clear that `Add` function will add the parameters. You can refer [this](https://go.dev/wiki/CodeReviewComments#named-result-parameters) wiki for more details.
7373

7474
## Write enough code to make it pass
7575

@@ -85,7 +85,7 @@ Ah hah! Foiled again, TDD is a sham right?
8585

8686
We could write another test, with some different numbers to force that test to fail but that feels like [a game of cat and mouse](https://en.m.wikipedia.org/wiki/Cat_and_mouse).
8787

88-
Once we're more familiar with Go's syntax I will introduce a technique called *"Property Based Testing"*, which would stop annoying developers and help you find bugs.
88+
Once we're more familiar with Go's syntax I will introduce a technique called _"Property Based Testing"_, which would stop annoying developers and help you find bugs.
8989

9090
For now, let's fix it properly
9191

@@ -162,7 +162,7 @@ If you publish your code with examples to a public URL, you can share the docume
162162

163163
What we have covered:
164164

165-
* More practice of the TDD workflow
166-
* Integers, addition
167-
* Writing better documentation so users of our code can understand its usage quickly
168-
* Examples of how to use our code, which are checked as part of our tests
165+
* More practice of the TDD workflow
166+
* Integers, addition
167+
* Writing better documentation so users of our code can understand its usage quickly
168+
* Examples of how to use our code, which are checked as part of our tests

structs-methods-and-interfaces.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ This kind of approach of using interfaces to declare **only what you need** is v
392392

393393
Now that you have some understanding of structs we can introduce "table driven tests".
394394

395-
[Table driven tests](https://github.com/golang/go/wiki/TableDrivenTests) are useful when you want to build a list of test cases that can be tested in the same manner.
395+
[Table driven tests](https://go.dev/wiki/TableDrivenTests) are useful when you want to build a list of test cases that can be tested in the same manner.
396396

397397
```go
398398
func TestArea(t *testing.T) {

sync.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ We've covered a few things from the [sync package](https://golang.org/pkg/sync/)
255255
### When to use locks over channels and goroutines?
256256

257257
[We've previously covered goroutines in the first concurrency chapter](concurrency.md) which let us write safe concurrent code so why would you use locks?
258-
[The go wiki has a page dedicated to this topic; Mutex Or Channel](https://github.com/golang/go/wiki/MutexOrChannel)
258+
[The go wiki has a page dedicated to this topic; Mutex Or Channel](https://go.dev/wiki/MutexOrChannel)
259259

260260
> A common Go newbie mistake is to over-use channels and goroutines just because it's possible, and/or because it's fun. Don't be afraid to use a sync.Mutex if that fits your problem best. Go is pragmatic in letting you use the tools that solve your problem best and not forcing you into one style of code.
261261

0 commit comments

Comments
 (0)