Skip to content

Instantly share code, notes, and snippets.

@178inaba
Created September 20, 2015 11:28
Show Gist options
  • Select an option

  • Save 178inaba/3398c50d68a2f76be587 to your computer and use it in GitHub Desktop.

Select an option

Save 178inaba/3398c50d68a2f76be587 to your computer and use it in GitHub Desktop.
tmp file from go
package main
import (
"fmt"
"io/ioutil"
"os"
)
func main() {
fmt.Println(os.TempDir())
fmt.Println(ioutil.TempDir("", ""))
tmp, err := ioutil.TempFile("", "prefix_")
fmt.Println(tmp.Name())
fmt.Println(err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment