随笔分类 -  Golang

摘要:package mainimport ( "fmt" "bufio" "io" "os" "strconv" "flag")var infile *string=flag.String("i","unsorted.data","File contains valu... 阅读全文
posted @ 2014-05-27 11:54 Arthur.Wang 阅读(455) 评论(0) 推荐(0)
摘要:package main import ("fmt")//对象定义type Rect struct{x,y float64width ,height float64} //对象方法实现func (r *Rect) Area()float64{return r.width*r.height}//Go语... 阅读全文
posted @ 2014-05-16 17:01 Arthur.Wang 阅读(3062) 评论(0) 推荐(0)
摘要:// Description: Golang语法与代码格式速记// Author: cxy// Date: 2013-04-01// Version: 0.3// TODO 说明// TODO package// Go是采用语法解析器自动在每行末尾增加分号,所以在写代码的时候可以把分号省略。// G... 阅读全文
posted @ 2014-04-24 23:04 Arthur.Wang 阅读(4639) 评论(0) 推荐(0)