Go之ioutil标准库
摘要:
1.读取文件全部内容 path:="./src/test.txt" basepath,_:=filepath.Abs(path) file,_:=os.Open(basepath) defer file.Close() text,_:=ioutil.ReadAll(file) fmt.Println 阅读全文
posted @ 2022-11-15 16:31 孤灯引路人 阅读(39) 评论(0) 推荐(0) 编辑