We as programmers often use temporary and this example shows how we can create and write to one. We used the ioutil package which has functions for just this.
The TempFile() accepts a folder and a prefix. As the folder we get the os’ directory (which would be /tmp on unix systems) and for the prefix we use a string, but if we don’t want one, we just pass an empty string.

Source link


Please enter your comment!
Please enter your name here