Eli Bendersky
15d8fe75b8
Add new example: logging with the log and log/slog packages
2023-08-22 13:45:00 -07:00
Eli Bendersky
840541a6bd
Rename http clients/servers to singular language: client/server
2022-09-22 13:44:25 -07:00
peterzhu1992
7e4533640b
Add embed-directive example ( #423 )
...
* Add embed-directive example and rename embedding to struct-embedding
Signed-off-by: peterzhu1992 <peterzhu1992@gmail.com>
* Minor tweaks
Signed-off-by: peterzhu1992 <peterzhu1992@gmail.com>
* Add some improvements
Signed-off-by: peterzhu1992 <peterzhu1992@gmail.com>
* Add isDir() checks for measure.go and generate.go in tools
Signed-off-by: peterzhu1992 <peterzhu1992@gmail.com>
2022-05-24 05:31:13 -07:00
peterzhu1992
a19c5b87e6
Rename embedding to struct embedding to be separated from //go:embed directive ( #424 )
...
Signed-off-by: peterzhu1992 <peterzhu1992@gmail.com>
2022-05-17 10:59:35 -07:00
Hayden B
ac01d2d4bb
Update SHA1 example to SHA256 ( #418 )
...
This encourages the use of stronger cryptographic hashes. Tools such as
securego/gosec will show errors when SHA1/MD5 hashes are used.
2022-03-31 05:41:58 -07:00
Eli Bendersky
881bb5d41c
Remove collection-functions
...
Now that we have generics, this example is not relevant.
Updates #349
2022-03-15 10:56:14 -07:00
Eli Bendersky
3c2447b2d1
Add example of Go generics ( #415 )
...
* Add example of Go generics
Fixes #349
* Remove TODO
* Update public link
* Update GitHub action to only build with 1.18-rc1
1.17 won't successfully build the generics example
2022-03-15 10:53:49 -07:00
Eli Bendersky
1fa5cff95c
Reorder examples slightly
...
Text Templates should come right after String Formatting
2022-02-11 06:19:37 -08:00
Arash Sameni
ccfd710f2b
Templates: added comments, output and listed in examples ( #413 )
2022-02-10 12:46:38 -08:00
Eli Bendersky
b2057ccfd2
strings-and-runes: added comments, output and listed in examples
2022-02-05 07:08:26 -08:00
Eli Bendersky
061b2f6455
Rename testing --> testing-and-benchmarking
2021-12-02 07:12:23 -08:00
Eli Bendersky
35ad9cc35c
Add example of struct embedding in Go
...
Also mention implementing interfaces with embedding
Fixes #381
Fixes #398
2021-11-22 12:48:11 -08:00
Eli Bendersky
91c8ceec2c
Adding a new example: recover
...
With thanks to @LaryBattle for the discussion in #46 and
@kilaka for the discussion in #344 .
Fixes #46
Closes #344
2021-09-01 08:51:00 -07:00
Mark McGranaghan
df99089b9f
Rename to shorter context
2020-01-04 09:50:52 -08:00
Eli Bendersky
fa91799164
Reformat comoments to flow better with the code
2019-11-19 06:41:40 -08:00
Eli Bendersky
be9b84288c
Add a new example: testing
2019-09-12 11:30:07 -07:00
Eli Bendersky
c715a7efc0
Complete the example text, add .sh and generate page
2019-09-01 16:13:01 -07:00
Mark McGranaghan
1097f13d1f
Adjust ordering per GitHhub PR
2019-06-30 13:59:01 -07:00
Eli Bendersky
8219122e44
Temporary files and directories sample
...
Followup on discussion in #243
2019-06-30 13:57:05 -07:00
Eli Bendersky
447d77234f
Add directories example
2019-06-08 06:11:13 -07:00
Eli Bendersky
52be303a71
File Paths example
2019-06-06 06:17:45 -07:00
Eli Bendersky
973da6773f
HTTP servers sample
2019-06-04 07:44:39 -07:00
Eli Bendersky
738fc184ef
Subcommands example
2019-06-04 05:48:59 -07:00
Eli Bendersky
dfcaebd536
Basic HTTP client sample
2019-05-31 12:08:57 -07:00
Eli Bendersky
ec0b192e48
Rename waitgroup-->waitgroups
2019-05-30 06:12:09 -07:00
Eli Bendersky
74ca2a7b0f
Addressing review comments
...
* Renamed the example
* Reworded comments
* Moved it to after worker pools
* Sleep for a second instead of random
* Mention the new sample in worker pools
2019-05-30 05:28:29 -07:00
Eli Bendersky
6ab81bdf71
Add "Waiting For Goroutines To Finish" example.
...
Also link to it from the Channel Synchronization example
2019-05-29 06:01:58 -07:00
Mark McGranaghan
75f7fb9039
Remove todo-ish list from examples.txt
...
At this point we're probably not going to add major new examples to
Go by Example. Remove the todo-ish looking list from examples.txt to
avoid implying otherwise in that file.
2014-12-13 16:20:54 -08:00
Mark McGranaghan
0b2622b368
some more ideas
2012-11-02 10:05:09 -07:00
Mark McGranaghan
bd44acd827
meh
2012-11-01 22:46:58 -07:00
Mark McGranaghan
c074646a1c
publish writing-files
2012-11-01 22:18:07 -07:00
Mark McGranaghan
85061bf84a
publish reading-files
2012-11-01 21:01:25 -07:00
Mark McGranaghan
5110cee76a
publish time-formatting-parsing
2012-11-01 15:26:20 -07:00
Mark McGranaghan
2a17561156
publish json
2012-11-01 10:14:57 -07:00
Mark McGranaghan
49da473ee9
punt on this until we actually need it
2012-11-01 09:24:33 -07:00
Mark McGranaghan
8da7528566
trim out some marginal ideas for now
2012-11-01 08:51:28 -07:00
Mark McGranaghan
25c6837c08
publish errors
2012-11-01 08:21:46 -07:00
Mark McGranaghan
a74e08e088
publish string-formatting
2012-10-31 15:30:49 -07:00
Mark McGranaghan
be7f09c8e8
publish random-numbers
2012-10-31 09:31:02 -07:00
Mark McGranaghan
79003c6c3e
update on time plans
2012-10-31 09:17:56 -07:00
Mark McGranaghan
3d50c64ebd
publish epoch
2012-10-31 09:02:54 -07:00
Mark McGranaghan
13ef82a928
publish time
2012-10-31 08:54:39 -07:00
Mark McGranaghan
300c1dc390
start regular-expressions
2012-10-30 16:18:02 -07:00
Mark McGranaghan
266b028c63
publish string-functions
2012-10-30 14:44:13 -07:00
Mark McGranaghan
8394e80542
publish collection-functions
2012-10-30 14:10:48 -07:00
Mark McGranaghan
0ba29703e5
sketch interfaces
2012-10-25 22:17:51 -04:00
Mark McGranaghan
f8ed65b151
publish number-parsing
2012-10-25 21:54:35 -04:00
Mark McGranaghan
27f79cd6cb
publish urls
2012-10-25 21:42:49 -04:00
Mark McGranaghan
9e8d0127d4
drop ok-guards for now
2012-10-25 21:24:25 -04:00
Mark McGranaghan
6e5585ff65
publish methods
2012-10-25 09:16:37 -04:00