@@ -7,7 +7,7 @@ a site that teaches Go via annotated example programs.
7
7
8
8
The Go by Example site is built by extracting code and
9
9
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 `
11
11
directory. The programs implementing this build process
12
12
are in ` tools ` , along with dependencies specified in
13
13
the ` go.mod ` file.
@@ -18,7 +18,7 @@ CloudFront, for example.
18
18
19
19
### Building
20
20
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 )
22
22
23
23
To build the site you'll need Go installed. Run:
24
24
@@ -34,7 +34,7 @@ $ tools/build-loop
34
34
35
35
To see the site locally:
36
36
37
- ```
37
+ ``` console
38
38
$ tools/serve
39
39
```
40
40
@@ -55,7 +55,7 @@ $ tools/upload
55
55
This work is copyright Mark McGranaghan and licensed under a
56
56
[ Creative Commons Attribution 3.0 Unported License] ( http://creativecommons.org/licenses/by/3.0/ ) .
57
57
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
59
59
[ Creative Commons Attribution 3.0 Unported License] ( http://creativecommons.org/licenses/by/3.0/ ) .
60
60
61
61
@@ -64,14 +64,15 @@ The Go Gopher is copyright [Renée French](http://reneefrench.blogspot.com/) and
64
64
Contributor translations of the Go by Example site are available in:
65
65
66
66
* [ 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 )
68
67
* [ 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 )
70
69
* [ Japanese] ( http://spinute.org/go-by-example ) by [ spinute] ( https://github.com/spinute )
71
70
* [ Korean] ( https://mingrammer.com/gobyexample/ ) by [ mingrammer] ( https://github.com/mingrammer )
72
71
* [ 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 )
75
76
76
77
### Thanks
77
78
@@ -81,13 +82,19 @@ inspired this project.
81
82
82
83
### FAQ
83
84
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
+
84
91
#### What version of Go is required to run these examples?
85
92
86
93
Given Go's strong [ backwards compatibility guarantees] ( https://go.dev/doc/go1compat ) ,
87
94
we expect the vast majority of examples to work on the latest released version of Go
88
95
as well as many older releases going back years.
89
96
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,
91
98
it's recommended to try running examples with the latest officially released Go version
92
99
(see Go's [ release history] ( https://go.dev/doc/devel/release ) for details).
93
100
@@ -97,6 +104,11 @@ Some of the examples demonstrate concurrent code which has a non-deterministic
97
104
execution order. It depends on how the Go runtime schedules its goroutines and
98
105
may vary by operating system, CPU architecture, or even Go version.
99
106
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
+
100
112
It doesn't mean anything is wrong with the example. Typically the code in these
101
113
examples will be insensitive to the actual order of the output; if the code is
102
114
sensitive to the order - that's probably a bug - so feel free to report it.
0 commit comments