Closed crpb closed 6 months ago
replace /tmp/pet.tmp with a file created by os.CreateTmp which is no more world readable and will also be removed on exit.
/tmp/pet.tmp
os.CreateTmp
https://pkg.go.dev/os#CreateTemp https://cs.opensource.google/go/go/+/refs/tags/go1.20:src/os/tempfile.go
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Thanks @crpb !
replace
/tmp/pet.tmp
with a file created byos.CreateTmp
which is no more world readable and will also be removed on exit.https://pkg.go.dev/os#CreateTemp https://cs.opensource.google/go/go/+/refs/tags/go1.20:src/os/tempfile.go
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.