1013 Commits

Author SHA1 Message Date
Eli Bendersky
ff70f04795 Adding example of HTTP server using context.Context 2019-11-19 06:39:53 -08:00
Mark McGranaghan
43825687bb Rebuild for environment-variables 2019-10-13 18:29:40 -07:00
Mark McGranaghan
410beb8393
Merge pull request #284 from smoser/fix/environment-split-n
Use SplitN rather than Split on os.Environ return value.
2019-10-13 21:28:56 -04:00
Mark McGranaghan
2c7063ec2f Rebuild 2019-10-13 18:28:25 -07:00
Mark McGranaghan
a81002a27f
Merge pull request #285 from gkotas/tickers-comment
Fixed comment in tickers.go
2019-10-13 21:25:35 -04:00
Scott Moser
c06d8a62c5 Use SplitN rather than Split on os.Environ return value.
Environment variables can contain a '=' in their value
   KEY=BAR=1 sh -c 'echo KEY VALUE is "$KEY"'

If you just use Split() then you may not actually get a 'pair'
but rather a slice with length >= 3.
2019-10-10 21:39:19 -04:00
Jerry Kotas
4076ee15e5 Fixed comment in tickers.go 2019-10-10 15:38:15 -04:00
Mark McGranaghan
82287d9903
Merge pull request #277 from danitello/structs-examples
Structs - fix example output
2019-09-28 19:44:20 -04:00
Eli Bendersky
61e8dde1c1 Use time.Sleep instead of fmt.Scanln to wait for goroutines
The Scanln doesn't work on the Go playground

Fixes #279
2019-09-20 14:55:41 -07:00
danitello
1c4e40df3f Structs - fix example output 2019-09-15 12:46:45 -07:00
Eli Bendersky
be9b84288c Add a new example: testing 2019-09-12 11:30:07 -07:00
Eli Bendersky
507f2b6145 Added table-driven tests and comments 2019-09-12 11:23:01 -07:00
Eli Bendersky
e5af060488 Add basic test in main_test and check it passes with 'go test' 2019-09-12 09:29:38 -07:00
Mark McGranaghan
8d0a0e06d2 Add Czech translation, closes #275 2019-09-10 14:50:40 -04:00
Mark McGranaghan
65c2883a9f
Merge pull request #274 from mmcgrana/consistent-import
Make multiple imports consistent with import ( ... ) style
2019-09-06 15:28:23 -07:00
Eli Bendersky
c273588521 Make multiple imports consistent with import ( ... ) style
Fixes #272
2019-09-06 15:20:22 -07:00
Mark McGranaghan
16859f8db1
Merge pull request #271 from mmcgrana/clarify-timeout-chan
Clarify use of buffered channel in the timeouts example.
2019-09-06 07:38:59 -07:00
Mark McGranaghan
9889d7f702 This transition paragraph no longer makes sense 2019-09-06 07:38:19 -07:00
Mark McGranaghan
fe9f3ab396
Merge pull request #270 from mmcgrana/atomics-det
Deterministic example for atomics.
2019-09-06 07:29:24 -07:00
Eli Bendersky
a34c967eaf Clarify use of buffered channel in the timeouts example.
The buffered channel prevents goroutine leaks in case the
channel doesn't end up being read (as indeed happens to c1).

Updates #207
2019-09-05 13:30:16 -07:00
Eli Bendersky
b70c15adaa Clarify reading op non-atomically 2019-09-05 13:26:08 -07:00
Eli Bendersky
ef8f0e3831 Deterministic example for atomics.
Fixes #265
2019-09-05 10:50:09 -07:00
Mark McGranaghan
13b0da17de Merge branch 'tickers' 2019-09-01 16:24:40 -07:00
Mark McGranaghan
a0ac6165dd Regnerate 2019-09-01 16:20:57 -07:00
Mark McGranaghan
738d92e305
Merge pull request #211 from baileywickham/master
Added warning for capital field names in structs
2019-09-01 16:17:42 -07:00
Mark McGranaghan
fab0a1888b Rengerate 2019-09-01 16:13:55 -07:00
Eli Bendersky
c715a7efc0 Complete the example text, add .sh and generate page 2019-09-01 16:13:01 -07:00
Eli Bendersky
62bfb159ac Initial code for XML sample
Covers marshal/unmarshal of a simple un-nested type.

No .sh file yet
2019-09-01 16:13:01 -07:00
Mark McGranaghan
78e1fd61ec Clean up merge 2019-09-01 16:09:36 -07:00
Bailey Wickham
99218c520a
Update export explanation 2019-09-01 16:07:33 -07:00
Mark McGranaghan
ee5c86daa9 Merge branch 'master' into clipboard 2019-09-01 15:42:08 -07:00
Mark McGranaghan
99505c3954 Regnerate 2019-09-01 15:30:27 -07:00
Mark McGranaghan
367e5d6b75
Merge pull request #257 from PeterBocan/master
Added a constructor to structs
2019-09-01 15:24:11 -07:00
Mark McGranaghan
490c0e7599 Regenerate 2019-09-01 15:17:30 -07:00
Mark McGranaghan
3e52c1d41b
Merge pull request #260 from mmcgrana/eliben-patch-1
Update CONTRIBUTING guide to mention tools/build
2019-09-01 15:14:49 -07:00
Mark McGranaghan
a63f6904e4
Merge pull request #268 from mmcgrana/linguist
Fix up language attribution for the Github UI
2019-09-01 15:13:11 -07:00
Mark McGranaghan
d8751b33a6
Merge pull request #262 from julian-zucker/http-servers-out-typo
Fix typo in http servers example
2019-09-01 15:10:09 -07:00
Eli Bendersky
0198f3e824 Fix up language attribution for the Github UI
Currently gobyexample is flagged as a CSS repository because of all the
generated HTML.

Following instructions at https://github.com/github/linguist#vendored-code to
ask Github to ignore files that are not actual origin code.
2019-08-24 06:28:01 -07:00
Julian Zucker
482bd86963 Fix typo in http servers example 2019-07-24 18:27:04 -06:00
Eli Bendersky
2862b97d01
Update CONTRIBUTING.md 2019-07-12 06:14:47 -07:00
Mark McGranaghan
fe361d879b Merge branch 'arrow-keys' 2019-07-08 19:06:46 -07:00
Mark McGranaghan
53a1b7a107 Regenerate 2019-07-08 19:04:48 -07:00
Shivam Rathore
1943fe0803 arrow keys navigation added | fixes mmcgrana/gobyexample#222 2019-07-08 19:04:14 -07:00
Mark McGranaghan
ff7d5ba117 Merge branch 'buildtestchanges' 2019-07-08 18:46:15 -07:00
PeterBocan
c22f42f03c Remove extra whitespace 2019-07-02 16:30:42 +02:00
PeterBocan
615d5e2eb4 Struct allocation fixes. 2019-07-02 15:46:54 +02:00
PeterBocan
c127e2898e Added a constructor to structs 2019-07-01 16:45:01 +02:00
Eli Bendersky
fe1443c7ed Combine testing environments on travis 2019-07-01 06:51:20 -07:00
Eli Bendersky
fb2c28e58a When testing on Travis, verify that tools/build was run
This is done by routing the generation of HTML into a temporary directory,
and checking its diff agains the existing public/ when running tests.

Fixes #237
2019-07-01 06:44:09 -07:00
Mark McGranaghan
3d55c3ae33 Tweak comment 2019-06-30 14:11:14 -07:00