Eclipse安装Go语言插件GoEclipseGoEclipse插件地址:http://goclipse.googlecode.com/svn/trunk/goclipse-update-site/接下来,配置插件
分类:
系统相关 时间:
2014-06-19 09:28:37
阅读次数:
600
①error接口Go语言中的error类型实际上是抽象了Error()方法的error接口type error interface { Error() string}Go语言使用该接口进行标准的错误处理。对于大多数函数,如果要返回错误,大致上都可以定义为如下模式,将error作为多种返回值中的...
分类:
其他好文 时间:
2014-06-18 23:37:33
阅读次数:
263
Go语言开发 可以使用的IDE很多 (Goclipse,sublime,notepad++,vim等)目前使用的最顺手的就是LiteIDE了但是尽管这样,一开始使用LiteIDE也有很多不习惯的地方,下面主要总结了一些自己喜欢的用法首先下载LiteIDE并安装(可用免安装的) 下载地址https:/...
分类:
其他好文 时间:
2014-06-18 16:21:26
阅读次数:
483
1、GO使用UTF-8编码,纯Unicode文本编写。2、$ go verson
(windows)3、windows下,需要设置go语言的环境变量,新建一个名为
GOROOT的变量,指向go的具体目录,例如:C:\go\bin。4、构建Go程序,需要进行编译和链接。5、注释风格与C++相同,//和...
分类:
其他好文 时间:
2014-06-05 14:11:16
阅读次数:
247
1 import "strconv" 2 3 func IsLeapYear(y string)
bool { //y == 2000, 2004 4 //判断是否为闰年 5 year, _ := strconv.Atoi(y) 6 if year%4 ==
0 && y...
分类:
其他好文 时间:
2014-05-26 15:12:52
阅读次数:
230
1 // filelist.go 2 package main 3 4 import ( 5
//"flag" 6 "fmt" 7 "os" 8 "path/filepath" 9 "strings"10 )11 12 var (13 ostype...
分类:
其他好文 时间:
2014-05-26 06:19:07
阅读次数:
239
Linux大棚版vimrc配置—V2.0版本,如下: [shell] $cat .vimrc “==
“Author :roc “Website:roclinux.cn “Version:2.0 “== “vim支持go语言 - 开始 “关闭文件类型检测功...
分类:
系统相关 时间:
2014-05-19 21:45:21
阅读次数:
496
1 package main //main函数 2 import "fmt"
//相当于#include 3 func main() { 4 ar := [10]int{9, 8, 6, 4, 2, 7, 1, 3, 0, 5} 5
num := len(ar) //...
分类:
其他好文 时间:
2014-05-17 14:25:49
阅读次数:
272