Golang - 型別宣告


Sep 05, 2021

string

var test1 string = "123"

int

var test1 int = 1

float64

var test1 float64 = 1.1

bool

var test1 bool = true

短變數宣告

test1 := 100
test2, test3 := 1.1, "123"
#golang #GO







你可能感興趣的文章

React-router-dom 實作與原理解析

React-router-dom 實作與原理解析

Web開發學習筆記01—Primitive type v.s. Object type

Web開發學習筆記01—Primitive type v.s. Object type

JAVA筆記_Lambda

JAVA筆記_Lambda






留言討論





2
2
2