mirror of https://github.com/dmarkham/enumer.git
Writing temp file to os temp dir
This commit is contained in:
parent
0f231a24f5
commit
a0342d7531
|
@ -18,7 +18,6 @@ import (
|
||||||
"go/importer"
|
"go/importer"
|
||||||
"go/token"
|
"go/token"
|
||||||
"go/types"
|
"go/types"
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -149,7 +148,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write to tmpfile first
|
// Write to tmpfile first
|
||||||
tmpFile, err := ioutil.TempFile(dir, fmt.Sprintf("%s_enumer_", typs[0]))
|
tmpFile, err := os.CreateTemp("", fmt.Sprintf("%s_enumer_", typs[0]))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("creating temporary file for output: %s", err)
|
log.Fatalf("creating temporary file for output: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue