Golang简单写文件操作的四种方法
载别人的代码 http://www.android100.org/html/201407/28/47230.html package mainimport ( "bufio" //缓存IO "fmt" "io/ioutil" //io 工具包 "io" "os" )func check(e error) { if e != nil { panic(e) } }/** * 判断文件是否存在 存在返回 true 不存在返回false */ func checkFileIsExist(filename string) (bool) { var exist = true; if _, err := os.Stat(filename); os.IsNotExist(err) { exist = fal...阅读全文