Commit Graph

63 Commits

Author SHA1 Message Date
Divay Prakash
ff06f9cf99 Fix defer wording, closes #2673 2018-10-09 22:59:19 +05:30
i
a78942e8f3
clear up wording 2018-07-06 11:41:46 -04:00
Ilya
c90ee7202e
[go/en] Small typo
Small typo in command line commad
2018-02-15 10:57:27 +07:00
Alexsander Akers
cf976f3fa7 Fix typo in Go comment 2017-08-04 15:40:52 +02:00
ven
88e1938994 fix #2700 2017-07-04 13:34:50 +02:00
gondo
801484a23b more clear explanation for interface (#2779)
more clear explanation why interface is consider defined without specifically declaring it (like in other languages `pair implement Stringer`)
2017-07-02 14:38:55 +02:00
Leonid Shevtsov
5f9d8fe4e0 [go] added practical examples for the underscore (#2414)
* go: added practical examples for the underscore

* Example of using underscore to discard the error
* Example of using underscore to loop over values of a slice
* Incidentally, example of writing to a file

* go: Adjust justification for ignoring error value
2016-10-31 18:08:32 +01:00
Carl
427f87c655 Updated closure
Corrected closure example that referenced assigning x to e^10, which does not happen in this iteration. Set x to a value large enough to make the comments hold true.
2016-06-04 00:26:18 -07:00
Robert Brown
4de15e41b3 correct minor grammar and formatting to improve readability 2015-10-24 13:56:20 +01:00
Romin Irani
da556f64f9 Added Go Mobile information 2015-10-14 12:03:05 +05:30
Clayton Walker
bc065831ce Added suggested changes 2015-10-08 23:24:25 -04:00
Clayton Walker
56ec0882a4 Added more to further reading 2015-10-07 00:07:00 -04:00
Clayton Walker
6a2fe434b8 Minor Typos, increased readability 2015-10-06 23:56:55 -04:00
Samuel Marks
1faab2901e Fallthrough 2015-04-23 00:02:33 +10:00
Samuel Marks
3bf74b3dda Fixed grammar, added explanation of function signature and arguments 2015-04-22 23:54:16 +10:00
Kev Choi
f63032d2f2 Add default case to switch statement in Go 2015-04-20 23:26:38 -07:00
kb
5e5a7a19fe [go] Fix no new variables on left side of :=
Cannot short declaration twice without at least one new var.  Also changing type from string to slice.

$ go run learnxiny.go
# command-line-arguments
./learnxiny.go:83: no new variables on left side of :=
./learnxiny.go:83: cannot use []int literal (type []int) as type string in assignment
./learnxiny.go:84: first argument to append must be slice; have string
./learnxiny.go:90: first argument to append must be slice; have string
2014-09-22 12:11:49 +00:00
Levi Bostian
291f6f6b22 Fix "initialized" typo. 2014-09-05 21:02:38 -05:00
Levi Bostian
1fb4886020 Merge pull request #703 from jcbohin/go-en-confusing_array_initialization-#257
[go/en] Array initialization disambiguation - fixes #257
2014-09-05 21:01:38 -05:00
Nami-Doc
0846eaa0e7 EDOUBLEDSPACE
My *fake* ocd kicked in
2014-09-05 15:05:13 +02:00
Sam Zaydel
161e19baa9 Minor language change fixing mixed use of array and slice, where only slice is correct. 2014-08-19 20:43:42 -07:00
Sam Zaydel
7000db24e0 Fixed indentation error created in previous commit. 2014-08-19 20:43:42 -07:00
Sam Zaydel
a7a8c85257 In golang slices are dynamic, so a mention of append() for slice updates seems to be appropriate. 2014-08-19 20:43:42 -07:00
James Baxter
d7ead48d1f Corrected the statement that rune is an alias for uint32 to say int32 2014-08-19 12:06:02 +01:00
Nami-Doc
e1982bf586 Merge pull request #707 from jcbohin/patch-1
[go/en] Adding Go playground link with code - fixes #318
2014-08-08 10:50:01 +02:00
Jean-Christophe Bohin
26166afc65 Fixed style
Didn't uppercased 'range' in the beginning of the sentence since it's a language keyword.
2014-08-07 22:43:59 +02:00
Jean-Christophe Bohin
c0d49cdb88 Fixing missing space and dot. 2014-08-07 22:37:52 +02:00
Jean-Christophe Bohin
a4b4a7927f Adding a direct link to play.golang.org 2014-08-07 22:31:20 +02:00
Jean-Christophe Bohin
2ffd792932 Adding Go playground link with code - fixes #318
Just removed networking code, since Go playground's sandbox prevent it to work.
2014-08-05 09:03:21 +02:00
Jean-Christophe Bohin
0078b03707 Array initialization disambiguation - fixes #257
simply added proposed comment, which seems fine
2014-08-04 22:38:53 +02:00
Jean-Christophe Bohin
cfa26f23fd [go/en] add an example for range - fixes #351 2014-08-04 22:23:24 +02:00
Hey Alexej
c022e2e857 fix import of io/ioutil, run gofmt
generated/downloaded file doesn't work with "go run". it's missing ioutil.
ran gofmt which uses tabs (width=8) for formatting. longest line is 85
characters now. removed whitespace.
2014-07-16 05:28:50 +07:00
Levi Bostian
36dae81010 Merge pull request #671 from szaydel/master
Function literals used inline in Go language
2014-07-10 23:42:41 -05:00
Sam Zaydel
7cddab2925 Forgot to add => to comment line. 2014-07-10 09:25:48 -07:00
Sam Zaydel
174f0baa14 Small change to inline literal functions comments. 2014-07-10 09:22:47 -07:00
Sam Zaydel
55e1c2adaf Go inline function literals as arguments to other functions or function literals. 2014-07-09 20:56:01 -07:00
Pete Hamilton
4c34096703 Remove duplication of function factory example 2014-07-05 12:03:09 +01:00
Levi Bostian
09459a25fe Merge pull request #663 from vvo/patch-2
feat(webserver request): add a http.Get example
2014-07-02 08:57:54 -05:00
Vincent Voyer
f2e3d99476 feat(webserver request): add a http.Get example
1. script now exits
2. we initiate a request to the started server to prove the serverHTTP works

what do you think?
2014-07-02 14:55:33 +02:00
Vincent Voyer
74c0a49e6d fix(go func factory): fix func factory example
previous code did not run because outside main() code was done
2014-07-02 14:37:15 +02:00
Sam Zaydel
8b6920a70a Learn function decorators with Go
Added snippet about using closures as function decorators in Go. Also
removed a few extra whitespaces.
2014-06-29 08:12:58 -07:00
Sam Zaydel
e881ba74f3 Hopefully slight language improvement over orig. 2014-06-23 07:31:39 -07:00
Sam Zaydel
9448404709 Slight language change per pull req. comment 2014-06-22 20:49:29 -07:00
Sam Zaydel
ff49deb886 Fixed on to in in comment. 2014-06-22 06:21:21 -07:00
Sam Zaydel
e5d8895c8e Should have more detail about named return values.
There was not a section about named return values, and it feels like it is a valuable and important enough thing to learn early on. If nothing else, when looking at someone else's code this may be a point of confusion.
2014-06-22 06:20:12 -07:00
Jose Donizetti
163d97c162 [go/en] add range index explication, and new learn source 2014-05-11 16:33:08 -04:00
Qumeric
07b229a425 Fix Go tutorial, especially ru translation 2014-04-16 18:06:58 +04:00
Quint Guvernator
ded11e254f added defer example
decided not to use file i/o as an example because external file access
is rare in other tutorials.
2014-02-02 15:11:15 -05:00
Jesse Johnson
2655b4d056 [go/en] Fix veriadic function bug; format and clarify comments. 2014-01-30 18:50:05 -05:00
C. Bess
863194a89a - add variadic function example 2014-01-24 15:30:15 -06:00