go - Convert back byte array into file using golang -
is there way write byte array file? have file name , file extension(like temp.xml).
sounds want ioutil.writefile
function standard library?
https://golang.org/pkg/io/ioutil/#writefile
it this:
permissions := 0644 # or whatever need bytearray := []byte("to written file\n") err := ioutil.writefile("file.txt", bytearray, permissions) if err != nil { ... }
Comments
Post a Comment