This repo contains my notes on working with Go and computer systems.
Go
1,936
288 commits
updated May 10, 2024
This repo contains my notes on work with Go and computer systems
Language Specification
Syntax
Struct: Declare_Initialize | Name And Anonymous type Field | Field Function| Iterate Field Name And Value | Selector and Promoted | Method Set
Function: Initialization | argument | multiple returns | named return
Data Structures
Decoupling
Dependency management Go Modules
Error Handling
Context
Concurrency LearnConcurrency
Diagnostics Profiling
Testing
Design Pattern Design Patterns | javatpoint
Crypto
databases
Awesome Go
Docs
Interview
defer called?
It was called according the consuming sequence of stack. That is to say, the first
deferclause will be invoked as the last.
defer and panic which is run first?
First
defer, thenpanic.
new() and make()?
For
newfunction, it returns pointer. It is used when initiate struct.Makeis mostly used when initiate slice, map and channel.
append() receive pointer as parameter?
No.

No.
When passing value, it will create a new copy. For pointer, it will pass the value itself.
str := "hello", str[1] = 'a' Is the string gonna modified?
No. Because the string is a constant.
string?
No. But we can assign nil to
*string
map and range is executed by sequence?
No.
==?
No.
No. &Vector{} , new(Vector) is the same, one thing to note: new() is the only way to get a pointer to an unnamed integer or other basic type. You can write "p := new(int)" but you can't write "p := &int{0}".
393 followers · starred Aug 2020
471 followers · starred Aug 2020
67 followers · starred Mar 2021
158 followers · starred Nov 2020
This repo contains my notes on working with Go and computer systems.
Go
1,936
288 commits
updated May 10, 2024
This repo contains my notes on work with Go and computer systems
Language Specification
Syntax
Struct: Declare_Initialize | Name And Anonymous type Field | Field Function| Iterate Field Name And Value | Selector and Promoted | Method Set
Function: Initialization | argument | multiple returns | named return
Data Structures
Decoupling
Dependency management Go Modules
Error Handling
Context
Concurrency LearnConcurrency
Diagnostics Profiling
Testing
Design Pattern Design Patterns | javatpoint
Crypto
databases
Awesome Go
Docs
Interview
defer called?
It was called according the consuming sequence of stack. That is to say, the first
deferclause will be invoked as the last.
defer and panic which is run first?
First
defer, thenpanic.
new() and make()?
For
newfunction, it returns pointer. It is used when initiate struct.Makeis mostly used when initiate slice, map and channel.
append() receive pointer as parameter?
No.

No.
When passing value, it will create a new copy. For pointer, it will pass the value itself.
str := "hello", str[1] = 'a' Is the string gonna modified?
No. Because the string is a constant.
string?
No. But we can assign nil to
*string
map and range is executed by sequence?
No.
==?
No.
No. &Vector{} , new(Vector) is the same, one thing to note: new() is the only way to get a pointer to an unnamed integer or other basic type. You can write "p := new(int)" but you can't write "p := &int{0}".
393 followers · starred Aug 2020
471 followers · starred Aug 2020
67 followers · starred Mar 2021
158 followers · starred Nov 2020