Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

golang 有没有PHP的file_put_contents()这样的使用起来很方便的函数进行写入操作呢?

PHP有内置函数:

file_put_contents_() 函数把一个字符串写入文件中

golang 有没有这样的使用起来很方便的函数进行写入操作呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
ioutil.WriteFile
ioutil.ReadFile

https://golang.org/pkg/io/ioutil/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...