1227 Commits

Author SHA1 Message Date
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
Eli Bendersky
294387674a Update aws-adk-go dependencies 2023-10-28 09:28:12 -07:00
Eli Bendersky
bc2c65c085 Update chroma dependency 2023-10-28 09:24:45 -07:00
Eli Bendersky
8a64f89840 Update directories sample to use WalkDir
Since Go 1.16, WalkDir is the recommended alternative over Walk
2023-10-28 08:22:37 -07:00
Eli Bendersky
41dd5d97b1 Add sample of logical operators in if statements
Fixes #494
2023-10-28 08:18:19 -07:00
Eli Bendersky
edab962054 Small comment updates to atomic-counters 2023-10-02 05:48:21 -07:00
Erazem Kokot
d1ca2ce65f
Update Atomic Counters example to use atomic.Uint64 (#490)
* Update Atomic Counters example to use atomic.Uint64

This commit updates the Atomic Counters example to follow atomic's
recommendation of using atomic.Uint64 instead of uint64 (same for other
types) and then calling methods on it, instead of calling
atomic.AddUint64().

It also updates the comments and empty lines a bit to look better on the
website.

* Run tools/build again

* Fix comments
2023-10-02 05:43:26 -07:00
Eli Bendersky
15d8fe75b8 Add new example: logging with the log and log/slog packages 2023-08-22 13:45:00 -07:00
Eli Bendersky
146bd9cce2 Add examples of maps/slices packages 2023-08-22 05:52:14 -07:00
Eli Bendersky
2166e61181 Update sorting-by-functions example to use slices.SortFunc 2023-08-21 12:47:17 -07:00
Eli Bendersky
655a3b6a9e Update sorting sample to use slices.Sort instead of sort package 2023-08-21 12:27:51 -07:00
Eli Bendersky
57db236e6c Properly fix extra newline rendered at the beginning of code segments 2023-08-21 09:03:37 -07:00
Eli Bendersky
83763d99d1 Bump Go version for GH actions 2023-08-21 07:05:34 -07:00
Eli Bendersky
4dc83f3ccc Update chroma from v0.8 to v2 (v2.8.0) and fix up formatting 2023-08-21 07:05:01 -07:00
Eli Bendersky
d51586e6bf Add example of the new clear() builtin for maps in 1.21
updates #481

Also bump go.mod to 1.21
2023-08-21 06:15:47 -07:00
Eli Bendersky
1ee3369f02 Add link from structs-->testing-and-benchmarking 2023-06-05 13:42:02 -07:00
Eli Bendersky
ef81b2a729 Fix typo in a comment
This was suggeste in #477 by @mnm364

Fixes #477
2023-06-05 05:48:59 -07:00
Eli Bendersky
6bd7615366 Reword comment in new anon struct sample 2023-06-05 05:47:05 -07:00
Hossein Naghdbishi
4b9411514f
Introduce anonymous structs (#474) 2023-06-05 05:40:49 -07:00
Eli Bendersky
1512fb0094 slices: tweak the recent changes for clarity and grammar 2023-05-16 11:10:16 -07:00
jiangbo
fd4d72bccf
add unassigned slice example (#475) 2023-05-16 11:04:20 -07:00
Ha Quang Phuoc
fcc06e2fe1
Add Vietnamese version translation (#472) 2023-04-26 05:27:18 -07:00
Hossein Naghdbishi
cb2d0d9555
/bin/bash -> /usr/bin/env bash (#471)
Using env offers better portability
2023-04-19 16:25:41 -07:00
Hossein Naghdbishi
363849f9e3
link embed directive (#469) 2023-04-19 16:25:27 -07:00
Lucas
0a1da7e32d
Added Brazilian portuguese (PT-BR) to translations list, updated link. (#468)
* Added Brazilian portuguese (PT-BR) to translations list.

* Updated translation list
2023-04-03 05:52:38 -07:00
Eli Bendersky
4b9ed3f43a
Remove dead links to translations in README 2023-04-03 05:51:01 -07:00
Eli Bendersky
ea61a8431a Revert "Added Brazilian portuguese (PT-BR) to translations list. (#467)"
The link to the translation is dead

This reverts commit 4280f948d30b29e11487590feeff16ebfb83464e.
2023-04-03 05:41:00 -07:00
Lucas
4280f948d3
Added Brazilian portuguese (PT-BR) to translations list. (#467) 2023-03-27 12:51:05 -07:00
Eli Bendersky
0812429584 Clarify zero value for map values when keys don't exist 2023-03-20 05:59:53 -07:00
siiky
38eb2236ca
dependes -> depends (#462) 2023-02-03 16:36:22 -08:00
Eli Bendersky
24b5e9a1ef Tweak CSS to decrease the font size in the footer
This should prevent wrapping on some screens
2023-01-31 05:40:48 -08:00
Eli Bendersky
b6baa3bb25
Minor README tweaks 2023-01-09 05:58:04 -08:00
Grejo Joby
4944c3bc7b
Added more information about shorthand variable declaration (#457) 2022-12-20 12:53:58 -08:00
Javier Pacareu
30a235b655
docs: remove typo (#454)
* docs: remove typo

* Update mutexes.go

* feat: add changes

Co-authored-by: Javier Pacareu <jpacareu.meli@gmail.com>
2022-12-12 06:21:16 -08:00
Eli Bendersky
f783c41698
Update CONTRIBUTING.md 2022-12-12 05:49:47 -08:00
Eli Bendersky
7b502fa0ec
Update CONTRIBUTING.md 2022-12-12 05:48:06 -08:00
Eli Bendersky
bc9700aab3 Add missing $ go run ... line on top of generics.sh
Fixes #452
2022-11-03 06:03:54 -07:00
Eli Bendersky
0650d74678 Slight rewording 2022-10-25 06:02:53 -07:00
Aditya Sood
9ba0fd08de
Minor addition to if-else text on declarations (#450)
* Minor addition to if-else text on declarations

Extremely minor addition to if-else text on declarations preceding conditionals, by explicitly clarifying that variables declared are only available in branches succeeding the declaration, not all the branches in the if-else ladder (i.e. preceding branches will not have it in their scope)

This edit might be redundant since variables in Golang can only be used after declaration, but to a complete novice the original wording of "...any variables declared in this statement are available in *all* branches..." might be a little misleading and appear to say that the variable is in-scope for the preceding branches as well (as this seems to be a very Golang-specific semantic that other high-level languages like C/C++, Java, Scala, Kotlin etc don't support; and so it will be a brand new paradigm for developers coming from such languages).

Thanks!

* Increment: Include changes in source .go file for #450
2022-10-25 06:00:36 -07:00
Eli Bendersky
4f668ee955 Re-generate output following previous change updating recover.go 2022-09-23 06:13:30 -07:00
Naoya Ueda
c40fcde81f
Add missing command line example for recover.sh (#444) 2022-09-23 06:12:58 -07:00
Eli Bendersky
2f242db012 Remove old public html 2022-09-22 13:45:14 -07:00
Eli Bendersky
840541a6bd Rename http clients/servers to singular language: client/server 2022-09-22 13:44:25 -07:00
Eli Bendersky
cc804d764b Clarify determinism of Go playground w.r.t. random numbers
Fixes #443
2022-09-22 07:05:32 -07:00
Eli Bendersky
00543ca6f7 Update Go version to 1.19 in go.mod and GH actions 2022-09-08 06:30:01 -07:00
Eli Bendersky
b4f289fe92 Adjust for gofmt changes in 1.19
In 1.19, gofmt slightly changes how comments are formatted; a blank `//` is
inserted before `//go:embed` directives.

To accommodate for that in generate.go, treat empty comment lines as
part of docs segments.
2022-09-08 05:55:05 -07:00
Eli Bendersky
742fab3f1c Clarify slices vs. arrays a bit
Highlight slices in the opening description of the arrays example, to
grab attention of new users
2022-09-08 05:37:20 -07:00