
Go
文章平均质量分 60
Schele
Stay Hungry,Stay Foolish
展开
-
SublimeText, Eclipse, Liteide--Golang开发环境搭建(Windows版)
Go SDK 安装访问golang的官方网站,http://golang.org, 点击Download Go按钮或者直接访问, http://golang.org/dl, 进入下载页面 下载msi安装版,或者源码版即可(须通过源码安装),建议使用安装版,直接快意Go的江湖。 安装时,可使用默认的路径,最后会生成在c:/go目录下,同时在系统环境变量中已然添加好c:/go/bin。原创 2015-09-04 14:48:32 · 1570 阅读 · 0 评论 -
Golang学习笔记:语言规范二
类型转换形式为 T(x), T是一种类型,x是目标类型表达式。示例*Point(p) // same as *(Point(p))(*Point)(p) // p is converted to *Point<-chan int(c) // same as <-(chan int(c))(<-chan int)(c) // c is converted to原创 2015-10-17 18:27:09 · 1846 阅读 · 0 评论 -
Golang学习笔记:语言规范之类型(续)
类型(续)指针类型指针类型表示所有给定类型的指针变量,也称为基础类型的指针,默认未初始化的指针类型值为nil。PointerType = "*" BaseType .BaseType = Type .*Point*[4]int函数类型函数类型表示拥有相同参数和返回值类型的函数,未初始化的函数类型变量的值为nil,定义如下FunctionType = "func" Signature .原创 2015-10-17 11:45:33 · 991 阅读 · 0 评论 -
Golang学习笔记:语言规范之词汇元素和类型
引言Golang参考手册,更多内容请参考http://golang.org 语言规范参考自https://golang.org/ref/spec词汇元素注释行注释: // comment content 段注释:/* comment content */符号符号有4类:标识符、关键字、操作符和分隔符、字面常量分号golang中,分号可省略标识符标识符即程序中的变量和类型,有一个或多个字母或数原创 2015-10-11 15:55:13 · 2290 阅读 · 0 评论 -
Golang学习笔记:语言规范之声明与作用域
类型声明包括:常量、自定义类型、变量、函数、标签、还有包声明。 程序中的标识符都必须声明。块、包、文件中的标识符不能重复。Declaration = ConstDecl | TypeDecl | VarDecl .TopLevelDecl = Declaration | FunctionDecl | MethodDecl .标签作用域标签是在标签语句中使用,常用在break、continu原创 2015-10-17 15:22:19 · 1454 阅读 · 0 评论