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

Summary of Go’s data types

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

The following is a summary of Go’s data types in thegolang tutorialcolumn. I hope it will be helpful to friends in need!

Summary of Go’s data types

Summary of Go’s data types

##bool false := true Non-quote ##Character (string) ##Number (int) 0 := 1 Non-reference nil Depends on child elements depends on child elements := struct {…} Non-reference ##Slice := make([]element, N) := make(map structure) Reference key cannot be func, map, slice Channel None := make(channel element) Quote ##Func None Reference
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