Home > Article > Backend Development > Summary of Go’s data types
The following is a summary of Go’s data types in the golang tutorial column. I hope it will be helpful to friends in need!
Summary of Go’s data types
Elements | Zero value | Initialization | Type | Notes |
---|---|---|---|---|
false | := true | Non-quote | ||
"" | := “word” | non-quote | ||
:= 1 | Non-reference |
##Pointer |
||
:= &v | Quote |
Array |
||
: = [N]Element{…} | Non-reference | ##Struct | depends on child elements||
Non-reference | ##Slice |
None | ||
Quote | ##Map | None | := make(map structure)||
key cannot be func, map, slice | Channel | None | := make(channel element) | |
##Func | None |
:= func structure |
||
Function parameters are passed by value | Interface | No | base class, cannot be initialized | |
The above is the detailed content of Summary of Go’s data types. For more information, please follow other related articles on the PHP Chinese website!