go总结-golang
2020-09-23 10:00:34 0 举报
AI智能生成
go总结,golang总结,不断更新。
作者其他创作
大纲/内容
golang
flow
if
if{ } else [if]{ }
for
for...range
continue|break[LABEL]
switch
case
default
select
goto LABEL
function
func
Closure
method
ptr receiver
value receiver
OOP
abstraction
interface
struct
encapsulation
package
access control
inheritance
polymorphism
custom type
test
unit test
Test* func
*_test.go
performance test
benchmark test
Example test
unsafe
unsafe.Offset
unsafe.Pointer
uintptr
data type
concrete type
value type
single-value
number
int
float
string
bool
multi-value
array
[...]T
[len]T
complex
reference type
ptr
map
chan
slice
[]T
[]T{}
array[low:high]
array[low:high:max]
abstract type
interface{}
dynamic type[interface]
x.(T)
dynamic value[struct]
type NewType underline-type
1. act as underline-type but not the same type
2. add more actions
goroutine
GPM
m:n mapping
SYNC
Mutex
RWMutex
Once
WaitGroup
Pool
Map
Cond
sync chan
buffer chan
Context
WithCancel
WithValue
WithDeadline
WithTimeout
GC
marked by three colors
STW
reflect
reflect.TypeOf
Type
Kind
reflect.ValueOf
IsValid( )
IsNil( )
defer[chan]
1. associated with goroutine
2. FILO
收藏
0 条评论
回复 删除
下一页