Writing

ioutil.WriteFile() is used to write data to a file. The WriteFile() method accepts 3 different parameters, the first is the location of the file we want to write, the second is the data object and the third is FileMode, which represents the file mode and permission bits.


ioutil.WriteFile("path/to/file.txt", []byte("content"), 0644)
                        
writting.go