Skip to content

Commit 137eb09

Browse files
committed
Merge branch 'translate-en-2024'
2 parents 6728346 + ff1eaa4 commit 137eb09

File tree

278 files changed

+12481
-9724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+12481
-9724
lines changed

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macos-latest]
15-
go-version: [1.17.x]
15+
go-version: [1.23.0]
1616

1717
runs-on: ${{ matrix.os }}
1818
steps:
1919
- uses: actions/checkout@v2
2020

2121
- name: Set up Go
22-
uses: actions/setup-go@v2
22+
uses: actions/setup-go@v3
2323
with:
2424
go-version: ${{ matrix.go-version }}
2525

.textlintrc .textlintrc.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
"rules": {
66
"preset-ja-technical-writing": {
77
"ja-no-weak-phrase": false,
8+
"max-kanji-continuous-len": {
9+
"max": 6,
10+
"allow": [
11+
"可変長引数関数"
12+
]
13+
},
814
"max-ten": {
915
"max": 4
1016
},
1117
"no-exclamation-question-mark": false
1218
}
13-
},
14-
"filters": {
15-
"whitelist": {
16-
"allow": [
17-
"可変長引数関数"
18-
]
19-
}
2019
}
2120
}

CONTRIBUTING.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
Thanks for your interest in contributing to Go by Example!
44

5-
* When sending a PR that affects the displayed contents of the site, run
6-
`tools/build` locally and include the generated HTML in the PR. If you
7-
only want to submit a simple typo suggestion (for example, through the
8-
Github website), feel free to send a PR anyway - we'll regenerate the
9-
HTML and merge with your commit.
5+
* When sending a PR that affects the displayed contents of the site,
6+
updating the HTML in the `public` directory by itself is insufficient, since
7+
the source of truth for the website is in the `examples` directory.
8+
9+
Instead, update the proper source file(s) in the `examples` directory and
10+
run `tools/build` locally to regenerate the HTML; include both changes in
11+
your PR.
12+
13+
If you don't want to deal with getting a proper PR in, feel free to just
14+
open an issue and point out the change you suggest.
1015

1116
* We're open to adding more examples to the site. They should be on things
1217
used by many programmers and only require the standard library. If you're

README.md

+21-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ a site that teaches Go via annotated example programs.
77

88
The Go by Example site is built by extracting code and
99
comments from source files in `examples` and rendering
10-
them via the `templates` into a static `public`
10+
them using `templates` into a static `public`
1111
directory. The programs implementing this build process
1212
are in `tools`, along with dependencies specified in
1313
the `go.mod`file.
@@ -18,7 +18,7 @@ CloudFront, for example.
1818

1919
### Building
2020

21-
[![Build Status](https://github.com/mmcgrana/gobyexample/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/mmcgrana/gobyexample/actions)
21+
[![test](https://github.com/mmcgrana/gobyexample/actions/workflows/test.yml/badge.svg)](https://github.com/mmcgrana/gobyexample/actions/workflows/test.yml)
2222

2323
To build the site you'll need Go installed. Run:
2424

@@ -34,7 +34,7 @@ $ tools/build-loop
3434

3535
To see the site locally:
3636

37-
```
37+
```console
3838
$ tools/serve
3939
```
4040

@@ -55,7 +55,7 @@ $ tools/upload
5555
This work is copyright Mark McGranaghan and licensed under a
5656
[Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/).
5757

58-
The Go Gopher is copyright [Renée French](http://reneefrench.blogspot.com/) and licensed under a
58+
The Go Gopher is copyright [Renée French](https://reneefrench.blogspot.com/) and licensed under a
5959
[Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/).
6060

6161

@@ -64,14 +64,15 @@ The Go Gopher is copyright [Renée French](http://reneefrench.blogspot.com/) and
6464
Contributor translations of the Go by Example site are available in:
6565

6666
* [Chinese](https://gobyexample-cn.github.io/) by [gobyexample-cn](https://github.com/gobyexample-cn)
67-
* [Czech](http://gobyexamples.sweb.cz/) by [martinkunc](https://github.com/martinkunc/gobyexample-cz)
6867
* [French](http://le-go-par-l-exemple.keiruaprod.fr) by [keirua](https://github.com/keirua/gobyexample)
69-
* [Italian](http://gobyexample.it) by the [Go Italian community](https://github.com/golangit/gobyexample-it)
68+
* [Italian](https://gobyexample.it) by the [Go Italian community](https://github.com/golangit/gobyexample-it)
7069
* [Japanese](http://spinute.org/go-by-example) by [spinute](https://github.com/spinute)
7170
* [Korean](https://mingrammer.com/gobyexample/) by [mingrammer](https://github.com/mingrammer)
7271
* [Russian](https://gobyexample.com.ru/) by [badkaktus](https://github.com/badkaktus)
73-
* [Spanish](http://goconejemplos.com) by the [Go Mexico community](https://github.com/dabit/gobyexample)
74-
* [Ukrainian](http://butuzov.github.io/gobyexample/) by [butuzov](https://github.com/butuzov/gobyexample)
72+
* [Ukrainian](https://butuzov.github.io/gobyexample/) by [butuzov](https://github.com/butuzov/gobyexample)
73+
* [Brazilian Portuguese](https://lcslitx.github.io/GoEmExemplos/) by [lcslitx](https://github.com/LCSLITX)
74+
* [Vietnamese](https://gobyexample.vn/) by [s6k Gopher](https://github.com/s6k-gopher/gobyexample-vn)
75+
* [Burmese](https://setkyar.github.io/gobyexample) by [Set Kyar Wa Lar](https://github.com/setkyar/gobyexample)
7576

7677
### Thanks
7778

@@ -81,13 +82,19 @@ inspired this project.
8182

8283
### FAQ
8384

85+
#### I found a problem with the examples; what do I do?
86+
87+
We're very happy to fix problem reports and accept contributions! Please submit
88+
[an issue](https://github.com/mmcgrana/gobyexample/issues) or send a Pull Request.
89+
See `CONTRIBUTING.md` for more details.
90+
8491
#### What version of Go is required to run these examples?
8592

8693
Given Go's strong [backwards compatibility guarantees](https://go.dev/doc/go1compat),
8794
we expect the vast majority of examples to work on the latest released version of Go
8895
as well as many older releases going back years.
8996

90-
That said, some examples show off new features added in the latest release; therefore,
97+
That said, some examples show off new features added in recent releases; therefore,
9198
it's recommended to try running examples with the latest officially released Go version
9299
(see Go's [release history](https://go.dev/doc/devel/release) for details).
93100

@@ -97,6 +104,11 @@ Some of the examples demonstrate concurrent code which has a non-deterministic
97104
execution order. It depends on how the Go runtime schedules its goroutines and
98105
may vary by operating system, CPU architecture, or even Go version.
99106

107+
Similarly, examples that iterate over maps may produce items in a different order
108+
from what you're getting on your machine. This is because the order of iteration
109+
over maps in Go is [not specified and is not guaranteed to be the same from one
110+
iteration to the next](https://go.dev/ref/spec#RangeClause).
111+
100112
It doesn't mean anything is wrong with the example. Typically the code in these
101113
examples will be insensitive to the actual order of the output; if the code is
102114
sensitive to the order - that's probably a bug - so feel free to report it.

docs/404.html

+6-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)