src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/testutil/umask.go (about)

     1  package testutil
     2  
     3  // Umask sets the umask for the duration of the test, and restores it afterwards.
     4  func Umask(c Cleanuper, m int) {
     5  	save := umask(m)
     6  	c.Cleanup(func() { _ = umask(save) })
     7  }