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