Summary of Go's data types

藏色散人
Release: 2020-12-01 13:56:43
forward
2278 people have browsed it

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!

Related labels:
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!