Eli Bendersky
cecfee7229
Fix typo
...
test / build (1.23.0, macos-latest) (push) Has been cancelled
test / build (1.23.0, ubuntu-latest) (push) Has been cancelled
Fixes #610
2025-06-09 05:20:47 -07:00
Matt Nathan
10aea2d282
Replace for ;; with for range int in all examples ( #609 )
...
This to be more idiomatic of Go since it was introduced.
2025-06-02 08:27:06 -07:00
Asutosh Padhi
bd94e3e926
Fix incorrect comment style in timers.sh (// → #) ( #605 )
...
Fixes #604
2025-05-16 19:02:15 -07:00
Eli Bendersky
7f3bbdab22
Rename .hash file for consistency
...
Fixes #593
2025-05-13 05:42:49 -07:00
Eli Bendersky
d393387262
Fix link to http-server from context.go
...
Also rename .hash file for consistency
Fixes #603
2025-05-13 05:35:37 -07:00
Eli Bendersky
dc4d281034
Update testing-and-benchmarking for new benchmark Loop of Go 1.24
2025-02-24 06:11:01 -08:00
hudem1
a0afe45ff3
clarify a comment w.r.t. empty slice ( #571 )
...
* fix: Added go for routines - Correct doc
* fix: applied PR reviews
* fix: build file
2025-02-08 14:47:55 -08:00
Eli Bendersky
9f92e064a1
Clean up the defer example a bit
2025-01-29 05:39:08 -08:00
Eli Bendersky
2a6ddb935b
Fix Seek distances to work with sample data file
...
The text in reading-files.sh suggests creating a 9-byte file, and the current
Seek distances error out.
Fixes #564
2025-01-20 18:49:13 -08:00
Eli Bendersky
ad9cea3a54
Tweak interface example type assertion + update link
2025-01-06 05:47:45 -08:00
kevin-kho
858d475416
added type assertion example ( #567 )
...
* added type assertion example
* simplified example
2025-01-06 05:40:39 -08:00
Eli Bendersky
58894bd0f4
Update text and output of json example slightly
2024-12-30 07:03:07 -08:00
Bhaskar
795124176c
Added json.NewDecoder example ( #566 )
...
* Update json.go
adding example for json.NewDecoder
* updated as per Contributings.md instructions
2024-12-30 06:58:35 -08:00
Marek Furák
bc680ed6b2
Fix http-server filename ( #559 )
...
* Fix filename for running the http-server example
* Generate the fixed HTML
2024-11-04 05:03:43 -08:00
wwwstephen
81ec07ea0a
Correct inaccuracy in recursion description. ( #555 )
...
Co-authored-by: Eli Bendersky <eliben@gmail.com >
2024-09-23 13:33:02 -07:00
wwwstephen
78ecc3f8c1
Correct inaccuracy in recursion description. ( #554 )
2024-09-23 06:00:36 -07:00
Eli Bendersky
17b2ecf8d7
Add type to const definitions for enum values
...
Fixes #552
2024-09-11 10:48:28 -07:00
Eli Bendersky
9f66cb2ffd
Update generated HTML
2024-08-21 16:20:10 -07:00
Eli Bendersky
a0e4c0787e
Rename range over iterators sample and add a bit more sample
2024-08-21 07:27:28 -07:00
Eli Bendersky
4d27fb58cf
Small tweaks to the sample
2024-08-21 07:15:28 -07:00
Eli Bendersky
2f31c1f6c1
Initial example of range over custom types
2024-08-21 07:04:38 -07:00
Eli Bendersky
6ed788f3f5
Update generics example to prepare for iteration
2024-08-21 06:43:09 -07:00
Eli Bendersky
d51709a171
Rename range example to prepare for expansion
2024-08-21 06:13:09 -07:00
Eli Bendersky
bf195bf4eb
Clarify GC in structs example
...
Fixes #550
2024-08-14 08:14:52 -07:00
Alex
1a760375bd
Fix example name in its .sh
2024-08-14 06:41:56 -07:00
David E.
b832df61a6
fix: change "encoding.xml" to "encoding/xml" ( #546 )
2024-08-05 05:50:34 -07:00
Joseph Myers
aa04b84479
Remove unreachable code from enums example ( #540 )
...
* remove unreachable code from switch in enums example
* run build/tools to generate static content in /public
2024-07-03 09:24:40 -07:00
Jon Webb
308d4be300
Fix typo in examples/enums/enums.go ( #537 )
...
"unwknown" -> "unknown" in default switch case panic message.
2024-06-10 06:01:47 -07:00
Ali Görkem Çiçek
d774175f31
Fix typo in the enums example ( #530 )
2024-05-15 05:28:41 -07:00
Eli Bendersky
0b921edddd
New example: enums
...
Fixes #513
2024-05-14 06:25:29 -07:00
EmNudge
e5e90317bd
fix ending extension ( #526 )
2024-05-01 09:50:23 -04:00
Zhizhen He
665183dcd8
Fix typo in a comment ( #525 )
2024-04-30 23:38:05 -04:00
Elias Kauppi
baadeda664
Use seek enums and show other seek methods ( #524 )
...
* Use seek whence values
* Add examples of seeking with other methods
2024-04-29 05:47:21 -07:00
adriancuadrado
7958694c0e
Add an example with automatic array size ( #522 )
...
* Add am example with automatic array size
You can learn more about this here: https://go.dev/blog/slices-intro#arrays
* Update arrays.sh
Forgot about this file 😅
* Added example with indices in the initialization
* Added multi-dimensional array initialization example
* Removed clarification about commas
* Run tools/build
* Fixed output mismatch
2024-04-15 07:34:57 -07:00
John Daniels
f8d60193e1
Add the shell prompt/command to custom-errors.sh ( #519 )
...
* Add the shell promt/command to custom-errors.sh
* Add prompt/command to errors example
---------
Co-authored-by: John <john@Slate.local >
2024-03-28 06:35:14 -07:00
Eli Bendersky
bee6d2d913
Fix wording slightly
2024-03-21 09:50:51 -07:00
Eli Bendersky
61cf4c732e
Update custom errors example
2024-03-21 09:43:14 -07:00
Eli Bendersky
a8332aad7a
Consolidate wrapping-and-sentinel-errors into errors
2024-03-21 07:23:33 -07:00
Thomas Güttler
cdb9266e26
Add wrapping errors ( #517 )
...
Fixes #334
* Add wrapping errors.
Before there was one page about error handling.
Now there are three.
A simple page (the first part of the existing page).
Then a new page about wrapping errors.
And the third page is the second half of the existing page (custom errors).
* ... addressed pr feedback.
* ./tools/build was run.
2024-03-21 06:22:47 -07:00
Aan Niraj Patel
9c71a850eb
Fix verbiage for Strings and Runes (noissue) ( #510 )
2024-02-22 09:14:58 -08:00
Sreejith I V
a3fb3a3b5b
Update waitgroups example to use go 1.22 ( #508 )
...
gorutine closures inside for loops does not require variable
reassignment since the 1.22 for loop changes
2024-02-09 04:51:32 -08:00
Eli Bendersky
5aa9ad70f3
Update random-numbers example to use Go 1.22's math/rand/v2
...
Fixes #507
2024-02-07 06:27:04 -08:00
Eli Bendersky
1143b547d7
Add Go 1.22's range-over-int example to for
2024-02-07 05:54:30 -08:00
Eli Bendersky
f7256dea96
Update random number examples to match new 1.20 semantics
...
Fixes #506
2024-01-31 05:08:06 -08:00
Eli Bendersky
da72468520
Reorder text to conform to output
2023-12-29 07:09:36 -08:00
Siddharth Buddharaju
0c31ca89f0
typo fix - if-else.sh ( #502 )
...
Fixes #502
2023-12-29 07:04:45 -08:00
Eli Bendersky
ef7998951d
Fix up comment length and text, and generate public/
2023-12-09 10:25:43 -08:00
Akhil Kumar
6fdb46ead6
Update generics.sh with correct response ( #500 )
2023-12-09 10:22:58 -08:00
Eli Bendersky
461f6955d6
Fix up formatting and phrasing for closed chan read
2023-11-30 05:08:42 -08:00
Boris Zhuravel
991f8937dd
Added example of reading from closed channel ( #498 )
...
* Add example of reading from closed channel
* Add second return value to read example
Also revert too complicated paragraph
2023-11-30 05:02:23 -08:00