hariprasadraja
10/4/2019 - 11:16 AM

go file create temporary file

[go file create temp] temporary files will be removed after the system gets restarted #go #file

	// Create a file in new temp directory
	tempFile, err := ioutil.TempFile(os.TempDir(), "myTempFile.txt")
	if err != nil {
		log.Fatal(err)
	}