d7a3a090df
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
13 lines
193 B
Go
13 lines
193 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package tools
|
|
|
|
import "syscall"
|
|
|
|
func doWithUmask(mask int, f func() error) error {
|
|
mask = syscall.Umask(mask)
|
|
defer syscall.Umask(mask)
|
|
return f()
|
|
}
|