Golang - 型別宣告



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







你可能感興趣的文章

[21] 強制轉型 - ToNumber、ToPrimitive、StringNumericLiteral、NonDecimalIntegerLiteral

[21] 強制轉型 - ToNumber、ToPrimitive、StringNumericLiteral、NonDecimalIntegerLiteral

一起探討 Micro Frontends 的世界

一起探討 Micro Frontends 的世界

[http] 不只是簡單的跨域請求 Preflight Request

[http] 不只是簡單的跨域請求 Preflight Request






留言討論