Benchmark showing that Go type assertion is pretty fast.
Discussion: https://old.reddit.com/r/golang/comments/9xs0r2/why_is_type_assertion_so_fast/
Benchmark showing that Go type assertion is pretty fast.
Discussion: https://old.reddit.com/r/golang/comments/9xs0r2/why_is_type_assertion_so_fast/
Superior to similar solutions. Doesn't use electron or cgo. Easy communication between Go and Js. Can easily use libs like React, Vue and Angular.
This is a demo app using GUI library https://github.com/zserge/lorca which requires only Chrome and might even work with Firefox in the future.
Public Domain is not a license and isn't legally accepted in some countries. So if you want to give stuff for free, it's better to just license it under MIT or BSD.
The term “public domain” refers to creative materials that are not protected by intellectual property laws such as copyright, trademark, or patent laws. The public owns these works, not an individual author or artist. Anyone can use a public domain work without obtaining permission, but no one can ever own it. - Stanford University definition
Can | Cannot |
---|
In the other file of this gist I detail why we should use struct{}
as context.Value() keys and not int
or string
. Open gist to see main.go
but the TLDR is:
type key struct{}
ctx = context.WithValue(ctx, key{}, "my value") // Set value
myValue, ok := ctx.Value(key{}).(string) // Get value
# Collection of one line text art (◕‿◕✿) | |
Collection of emojis and one line text art like (╯°□°)╯︵ ┻━┻ 🤗 | |
ּבּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ |
A collection of Markdown code and tricks that were tested to work in Gist.
This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.