go101
Repos
14
Followers
556

An up-to-date (unofficial) knowledge base for Go programming self learning

4780
357

An experimental Go local docs server/generator and code reader implemented with some fresh ideas.

453
23

A tool used to manage installations of multiple Go toolchain versions

19
2

A Go skia binding based on skia C library through cgo

C
23
5

A proposal to support read-only and immutable values in Go

2
1

A list of Go GUI projects

1038
54

Events

create tag
go101 create tag v0.1.3
Created at 6 hours ago
push

fix pin-version in 0.1.1 and 0.1.2

v0.1.3

Created at 6 hours ago
create tag
go101 create tag v0.1.2
Created at 8 hours ago
push

v0.1.2

Created at 8 hours ago
create branch
go101 create branch main
Created at 9 hours ago
create repository
go101 create repository
Created at 9 hours ago
issue comment
article: channel use cases

It looks it is the same as the manner mentioned in the code following the line The manner of acquiring semaphore ownership through sending is simpler comparatively ...

Created at 1 day ago
create tag
go101 create tag v0.1.1
Created at 3 days ago
push

v0.1.1

Created at 3 days ago

one new blog article and quiz

Created at 6 days ago

small improvements

relax the Lisence

Created at 1 week ago
issue comment
spec: the identity of instantiated types is not well defined

Didn't notice that line.

Thanks. Closed.

Created at 1 week ago
closed issue
spec: the identity of instantiated types is not well defined

What version of Go are you using (go version)?

Does this issue reproduce with the latest release?

Yes

What did you do?

package main

type G[T any] struct {}

func main() {
	var x, y, z any = G[int]{}, G[int]{}, G[bool]{}
	println(x == y) // true
	println(x == z) // false
}

The result might be not unexpected (some unexpected for me, as I think x == z should also result in true), but the current spec is not very clear on this:

Instantiating a type results in a new non-generic named type;

People may think the types of x and y are different by this description.

Created at 1 week ago
opened issue
spec: the identity of instantiated types is not well defined

What version of Go are you using (go version)?

Does this issue reproduce with the latest release?

Yes

What did you do?

package main

type G[T any] struct {}

func main() {
	var x, y, z any = G[int]{}, G[int]{}, G[bool]{}
	println(x == y) // true
	println(x == z) // false
}

The result might be not unexpected, but the current spec is not very clear on this:

Instantiating a type results in a new non-generic named type;

People may think the types of x and y are different by this description.

Created at 1 week ago
issue comment
Maybe typo in "Arrays, Slices and Maps in Go"

@nofrish Thanks for the findings.

"basic integer type" means any built-in integer type, such as int, int32, byte, etc. I add a link for the "basic integer type" text.

Created at 1 week ago

add 1.20 contents; fix https://github.com/go101/go101/issues/242

Merge branch 'master' of github.com:golang101/golang101

Created at 1 week ago
closed issue
Maybe typo in "Arrays, Slices and Maps in Go"

Just search "The keys in a map literal can be absent, they can be non-constants." I think you meant "The keys in a map literal can NOT be absent"

Created at 1 week ago

add 1.20 changes

fix https://github.com/go101/go101/issues/242

Created at 1 week ago
issue comment
《Go 细节和小技巧 101》电子书下载链接

也可以 clone git@github.com:golang101/golang101.wiki.git 或者 https://github.com/golang101/golang101.wiki.git。 电子书都在 ebooks 目录下。

Created at 1 week ago
issue comment
《Go 细节和小技巧 101》电子书下载链接

亲侧有效

Created at 1 week ago
issue comment
《Go 细节和小技巧 101》3.4 从字符串转换来的字节型切片的容量是未指定的

标题已经说明了原因:从字符串转换来的字节型切片的容量是未指定的。;)

Created at 1 week ago
issue comment
《Go 细节和小技巧 101》电子书下载链接

墙了?

Created at 1 week ago

Update README.md

Created at 1 week ago
opened issue
电子书下载链接
  • https://raw.githubusercontent.com/wiki/golang101/golang101/ebooks/golang-details-and-tips-101-v1.19.b-rev-ff9b2d1-2022-11-15.pdf
  • https://raw.githubusercontent.com/wiki/golang101/golang101/ebooks/golang-details-and-tips-101-v1.19.b-rev-ff9b2d1-2022-11-15.pdf
  • https://raw.githubusercontent.com/wiki/golang101/golang101/ebooks/golang-details-and-tips-101-v1.19.b-rev-ff9b2d1-2022-11-15.pdf
  • https://raw.githubusercontent.com/wiki/golang101/golang101/ebooks/golang-details-and-tips-101-v1.19.b-rev-ff9b2d1-2022-11-15.pdf

本帖时常更新,请适当关注。

Created at 1 week ago

Update README.md

Merge pull request #34 from nikolaydubina/patch-1

Added go-recipes badge

Created at 1 week ago
pull request closed
Added go-recipes badge

Hello, Hi!! 👋🏻

I like your project and I think broader Go community will benefit from it too.

Thus, I added it to the curated list of Go tools.

I hope this badge will serve as a mark of quality and appreciation to your project.

Once again, thank you for your work!!

❤️

-- Nikolay

Created at 1 week ago