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

Popular posts from this blog

xml - Extract substrings with XSLT -

How can do a tuple comparison in coffeescript similar to that in python? -

math - "ELO Rating" and how does "TSR Rating" work? -