You may find some resources in docs:
1 - Setup and entry points (Nothing much)
4 - Type assertions
6 - Interfaces
7 - Panic
8 - Variadic and spread operator
10 - Pointers
11 - Goroutines
12 - Channels
13 - Escape analysis
-
See the Concepts Readme for more interesting stuff concepts/README.md
-
Just like the Zen of Python, the Go Proverbs are a beautiful collection of wise words from Rob Pike, one of Go's creators
### Go Proverbs
___
Don't communicate by sharing memory, share memory by communicating.
Concurrency is not parallelism.
Channels orchestrate; mutexes serialize.
The bigger the interface, the weaker the abstraction.
Make the zero value useful.
interface{} says nothing.
Gofmt's style is no one's favorite, yet gofmt is everyone's favorite.
A little copying is better than a little dependency. // Yup, I know this one from somewhere 😅
Syscall must always be guarded with build tags.
Cgo must always be guarded with build tags.
Cgo is not Go.
With the unsafe package there are no guarantees.
Clear is better than clever.
Reflection is never clear.
Errors are values.
Don't just check errors, handle them gracefully.
Design the architecture, name the components, document the details.
Documentation is for users.
Don't panic.jq is a powerful command-line tool for processing JSON data. It's a favorite among developers for working with JSON because it can:
- Parse JSON: easily read and extract data from JSON responses.
- Manipulate JSON: modify JSON data on the fly.
- Filter JSON: find exactly what you're looking for within large JSON structures.
Example Suppose you have a JSON file named user.json with content:
{
"name": "John",
"age": 30,
"city": "New York"
}To extract the name field, you would use the object identifier index like so:
jq '.name' user.json
# "John"To get a field from each element in an array you can use the array/object value iterator .[], which can in turn be combined with the identifier index like so:
curl https://jsonplaceholder.typicode.com/users | jq '.[].username'
# "Bret"
# "Antonette"
# "Samantha"
# "Karianne"
# "Kamren"
# "Leopoldo_Corkery"
# "Elwyn.Skiles"
# "Maxime_Nienow"
# "Delphine"
# "Moriah.Stanton"Multiple Fields
curl https://jsonplaceholder.typicode.com/users/1 | jq '.name, .email'
# "Leanne Graham"
# "Sincere@april.biz"- Another typical use is
curlto parse JSON responses directly from HTTP requests. Eg.
curl https://jsonplaceholder.typicode.com/users/1 | jq .username
# "Bret"