mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
fa0fa8b1d0
This requires a further set of gofmt -s improvements to the code, but nothing major. golangci-lint 1.45.2 brings golang 1.18 support which might be needed in the future. Signed-off-by: Dirk Müller <dirk@dmllr.de>
16 lines
240 B
Go
16 lines
240 B
Go
//go:build !windows
|
|
|
|
package util
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
func SetFileModeForPath(name string, mode os.FileMode) error {
|
|
return os.Chmod(name, mode)
|
|
}
|
|
|
|
func SetFileModeForFile(file *os.File, mode os.FileMode) error {
|
|
return file.Chmod(mode)
|
|
}
|