摘要: package main /* 以简易方式打开一个文件,一秒后关闭 以只读方式打开一个文件,创建起带缓冲的读取器,逐行读取到末尾。 使用ioutil包堆 文件进行简易读取 */ import ( "fmt" "os" "time" ) func main() { file, e := os.Open("C:/Users/Administrator/Desk... 阅读全文
posted @ 2019-06-27 19:54 pad+ 阅读(171) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "math/rand" "time" ) type Animals interface { Live() Godie() } type Bird struct { } func (b *Bird) Live() { fmt.Println("一只鸟儿在飞翔") } func (b *Bi... 阅读全文
posted @ 2019-06-27 14:52 pad+ 阅读(165) 评论(0) 推荐(0) 编辑