Golang FAQ Posted on 2017-01-30 Edited on 2023-03-02 Views: 123456go build // 编译go run // 编译运行go fmt // formatgo installgo getgo test types of package 1. 可执行包:只有名称为main才是 2. reusable:其它都是库 bool string int float64 Go不是面向对象的语言,因此没有class/instance的概念 在这里插入图片描述 数组只能固定长度,传入变量只能创建为定义了size的切片 123length := 5array := [length]int // error: non-constant array bound lengtharray := make([]int, length) Donate WeChat Pay Alipay Post author: EIMadrigal Post link: https://eimadrigal.github.io/posts/golang-faq/ Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.