Skip to content

Commit 6faf782

Browse files
authored
chore: Update external Go links (#207)
* chore: Update external Go links * Auto-update style.md --------- Co-authored-by: vorobeyme <[email protected]>
1 parent 274463a commit 6faf782

20 files changed

+94
-98
lines changed

src/atomic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ read or modify the variables.
77
[go.uber.org/atomic] adds type safety to these operations by hiding the
88
underlying type. Additionally, it includes a convenient `atomic.Bool` type.
99

10-
[go.uber.org/atomic]: https://godoc.org/go.uber.org/atomic
11-
[sync/atomic]: https://golang.org/pkg/sync/atomic/
10+
[go.uber.org/atomic]: https://pkg.go.dev/go.uber.org/atomic
11+
[sync/atomic]: https://pkg.go.dev/sync/atomic
1212

1313
<table>
1414
<thead><tr><th>Bad</th><th>Good</th></tr></thead>

src/builtin-name.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ the original within the current lexical scope (and any nested scopes) or make
88
affected code confusing. In the best case, the compiler will complain; in the
99
worst case, such code may introduce latent, hard-to-grep bugs.
1010

11-
[language specification]: https://golang.org/ref/spec
12-
[predeclared identifiers]: https://golang.org/ref/spec#Predeclared_identifiers
11+
[language specification]: https://go.dev/ref/spec
12+
[predeclared identifiers]: https://go.dev/ref/spec#Predeclared_identifiers
1313

1414
<table>
1515
<thead><tr><th>Bad</th><th>Good</th></tr></thead>

src/embed-public.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The outer type gets implicit copies of the embedded type's methods.
6262
These methods, by default, delegate to the same method of the embedded
6363
instance.
6464

65-
[type embedding]: https://golang.org/doc/effective_go.html#embedding
65+
[type embedding]: https://go.dev/doc/effective_go#embedding
6666

6767
The struct also gains a field by the same name as the type.
6868
So, if the embedded type is public, the field is public.

src/error-type.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Consider the following before picking the option best suited for your use case.
1313
- Are we propagating a new error returned by a downstream function?
1414
If so, see the [section on error wrapping](error-wrap.md).
1515

16-
[`errors.Is`]: https://golang.org/pkg/errors/#Is
17-
[`errors.As`]: https://golang.org/pkg/errors/#As
16+
[`errors.Is`]: https://pkg.go.dev/errors#Is
17+
[`errors.As`]: https://pkg.go.dev/errors#As
1818

1919
| Error matching? | Error Message | Guidance |
2020
|-----------------|---------------|-------------------------------------|
@@ -23,8 +23,8 @@ Consider the following before picking the option best suited for your use case.
2323
| Yes | static | top-level `var` with [`errors.New`] |
2424
| Yes | dynamic | custom `error` type |
2525

26-
[`errors.New`]: https://golang.org/pkg/errors/#New
27-
[`fmt.Errorf`]: https://golang.org/pkg/fmt/#Errorf
26+
[`errors.New`]: https://pkg.go.dev/errors#New
27+
[`fmt.Errorf`]: https://pkg.go.dev/fmt#Errorf
2828

2929
For example,
3030
use [`errors.New`] for an error with a static string.

src/exit-main.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Go programs use [`os.Exit`] or [`log.Fatal*`] to exit immediately. (Panicking
44
is not a good way to exit programs, please [don't panic](panic.md).)
55

6-
[`os.Exit`]: https://golang.org/pkg/os/#Exit
7-
[`log.Fatal*`]: https://golang.org/pkg/log/#Fatal
6+
[`os.Exit`]: https://pkg.go.dev/os#Exit
7+
[`log.Fatal*`]: https://pkg.go.dev/log#Fatal
88

99
Call one of `os.Exit` or `log.Fatal*` **only in `main()`**. All other
1010
functions should return errors to signal failure.

src/function-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ names]. An exception is made for test functions, which may contain underscores
55
for the purpose of grouping related test cases, e.g.,
66
`TestMyFunction_WhatIsBeingTested`.
77

8-
[MixedCaps for function names]: https://golang.org/doc/effective_go.html#mixed-caps
8+
[MixedCaps for function names]: https://go.dev/doc/effective_go#mixed-caps

src/interface-receiver.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Methods with value receivers can be called on pointers as well as values.
44
Methods with pointer receivers can only be called on pointers or [addressable values].
55

6-
[addressable values]: https://golang.org/ref/spec#Method_values
6+
[addressable values]: https://go.dev/ref/spec#Method_values
77

88
For example,
99

@@ -75,4 +75,4 @@ i = s2Ptr
7575

7676
Effective Go has a good write up on [Pointers vs. Values].
7777

78-
[Pointers vs. Values]: https://golang.org/doc/effective_go.html#pointers_vs_values
78+
[Pointers vs. Values]: https://go.dev/doc/effective_go#pointers_vs_values

src/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ This documents idiomatic conventions in Go code that we follow at Uber. A lot
2020
of these are general guidelines for Go, while others extend upon external
2121
resources:
2222

23-
1. [Effective Go](https://golang.org/doc/effective_go.html)
24-
2. [Go Common Mistakes](https://github.com/golang/go/wiki/CommonMistakes)
25-
3. [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
23+
1. [Effective Go](https://go.dev/doc/effective_go)
24+
2. [Go Common Mistakes](https://go.dev/wiki/CommonMistakes)
25+
3. [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments)
2626

2727
We aim for the code samples to be accurate for the two most recent minor versions
2828
of Go [releases](https://go.dev/doc/devel/release).
@@ -34,4 +34,4 @@ recommend setting up your editor to:
3434
- Run `golint` and `go vet` to check for errors
3535

3636
You can find information in editor support for Go tools here:
37-
<https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins>
37+
<https://go.dev/wiki/IDEsAndTextEditorPlugins>

src/lint.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ quality without being unnecessarily prescriptive:
1414
- [staticcheck] to do various static analysis checks
1515

1616
[errcheck]: https://github.com/kisielk/errcheck
17-
[goimports]: https://godoc.org/golang.org/x/tools/cmd/goimports
17+
[goimports]: https://pkg.go.dev/golang.org/x/tools/cmd/goimports
1818
[golint]: https://github.com/golang/lint
19-
[govet]: https://golang.org/cmd/vet/
20-
[staticcheck]: https://staticcheck.io/
19+
[govet]: https://pkg.go.dev/cmd/vet
20+
[staticcheck]: https://staticcheck.dev
2121

2222
## Lint Runners
2323

src/package-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ When naming packages, choose a name that is:
1111

1212
See also [Package Names] and [Style guideline for Go packages].
1313

14-
[Package Names]: https://blog.golang.org/package-names
14+
[Package Names]: https://go.dev/blog/package-names
1515
[Style guideline for Go packages]: https://rakyll.org/style-packages/

0 commit comments

Comments
 (0)