共 6 篇文章 |
|
mac 下搭建go开发环境1.安装brewruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew update && brew upgrade2.参考网站https://blog.helloarron.com/2015/08/29/go/mac-install-go/ 阅57 转0 评0 公众公开 17-12-19 15:44 |
rect1 := new(Rect)rect2 := &Rect{}rect3 := &Rect{0, 0, 100, 200}rect4 := &Rect{width:100, height:200}注意这几个变量全部为指向Rect结构的指针(指针变量),因为使用了new()函数和&操作符.而如果使用方法。a := Rect{}func main() {a := Rect{}a.x = 15rect1 := &Rect{0, 0, 100, 200}rect1.x = 10fmt.Printf("... 阅2724 转0 评0 公众公开 17-11-14 17:47 |
阅713 转0 评0 公众公开 17-11-14 17:26 |
开始学习go语言一、go环境安装参考教程:https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/preface.mdgo下载地址https://golang.org/dl/subline Text下载地址http://www.sublimetext.com/go入门学习网站https://www.gitbook.com/book/tiancaiamao/go-internals/detailshttps://github.com/Unknwon/the-way-to-go_... 阅39 转0 评0 公众公开 17-11-08 21:52 |