https://i6448038.github.io/2017/07/28/GolangDetails/
new(type)不为nil
fmt.Println(new(int)==nil) # false
var i *int
fmt.Println(i==nil) # true一个包里可以有多个init函数,多个init函数的调用顺序 https://golang.org/ref/spec#Program_initialization_and_execution
2018-12-02 22:28:51
浏览 1247
https://i6448038.github.io/2017/07/28/GolangDetails/
new(type)不为nil
fmt.Println(new(int)==nil) # false
var i *int
fmt.Println(i==nil) # true
一个包里可以有多个init函数,多个init函数的调用顺序 https://golang.org/ref/spec#Program_initialization_and_execution
随时随地看视频慕课网APP
相关课程