Commit Graph

2 Commits

Author SHA1 Message Date
Dennis Ameling
d7a3a090df Update formatting for Go 1.17
From the 1.17 release notes (https://golang.org/doc/go1.17#gofmt): gofmt (and go fmt) now synchronizes //go:build lines with // +build lines.

More info about this change can be found at https://golang.org/design/draft-gobuild
2021-08-17 20:24:58 +02:00
brian m. carlson
f5d5f487eb
tools: add function to make directories honoring core.sharedRepository
Add a function to make a directory and intervening directories, honoring
core.sharedRepository.

To do so, add a utility function to perform an operation with the umask
set to a certain value. This is required because os.MkdirAll honors the
umask and is potentially recursive (so we can't fix things after
creating them). Without temporarily setting the umask, it isn't possible
to create directories with the right permissions if those permissions
are looser than the original umask.
2018-12-13 17:51:02 +00:00