Home  >  Article  >  Backend Development  >  Summary of Go’s data types

Summary of Go’s data types

藏色散人
藏色散人forward
2020-12-01 13:56:342323browse

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

Summary of Go’s data types

##boolfalse:= trueNon-quote##Character (string)##Number (int)0:= 1Non-referencenilDepends on child elementsdepends on child elements:= struct {…}Non-reference##Slice:= make([]element, N):= make(map structure)Referencekey cannot be func, map, sliceChannelNone:= make(channel element)Quote##FuncNoneReference
Elements Zero value Initialization Type Notes

"" := “word” non-quote

##Pointer
:= &v Quote
Array
: = [N]Element{…} Non-reference ##Struct

None
Quote ##Map 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!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete