]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/renameio: allow write file with the specified permissions
authorBaokun Lee <nototon@gmail.com>
Thu, 9 May 2019 03:24:30 +0000 (11:24 +0800)
committerBryan C. Mills <bcmills@google.com>
Wed, 15 May 2019 14:32:33 +0000 (14:32 +0000)
commitcefc0bbc9011baa62a8284d61452ba33245e8455
tree000d45d67d5b22194d1a2e3e33eef2150bf351d8
parent1e3ffb0c902fc282469e7748ce066ee9ea7a6580
cmd/go/internal/renameio: allow write file with the specified permissions

Now renameio package creates file use ioutil.TempFile, which calls
OpenFile with mode 0600, we should support creates a file with given
permission bits.

Fixes #31871

Change-Id: I0436e9f7081f2fce18bf9f3b14d55b02d4d995fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/175958
Run-TryBot: Baokun Lee <nototon@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/cache/cache.go
src/cmd/go/internal/modfetch/cache.go
src/cmd/go/internal/modfetch/fetch.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/renameio/renameio.go
src/cmd/go/internal/renameio/renameio_test.go [new file with mode: 0644]