Loading

摘要: 1、以块的形式读取文件 package main import ( "io" "os" "fmt" ) const BufferSize = 100 func main() { file, err := os.Open("filetoread.txt") if err != nil { fmt.Pr 阅读全文
posted @ 2021-08-02 16:37 Allfuture 阅读(70) 评论(0) 推荐(0) 编辑
摘要: package main import ( "bufio" //缓存IO "fmt" "io" "io/ioutil" //io 工具包 "os" ) func check(e error) { if e != nil { panic(e) } } /** * 判断文件是否存在 存在返回 true 阅读全文
posted @ 2021-08-02 16:25 Allfuture 阅读(363) 评论(0) 推荐(0) 编辑