mirror of
https://github.com/containers/podman.git
synced 2025-11-29 09:37:38 +08:00
fileperms: newer Go 1.13+ octal literal format
Problem: While removing cgroupsv1 code, I noticed my neovim Go config automatically changed fileperms to the new octal format and I didn't want that polluting my diffs. Decision: I thought it best to switch to the new octal format in a dedicated PR. Action: - Cursor switched to new octal format for all fileperm ocurrences in Go source and test files. - vendor/, docs/ and non-Go files were ignored. - Reviewed manually. Ref: https://go.dev/ref/spec#Go_1.13 Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
@@ -34,7 +34,7 @@ func checkCgroups2UnifiedMode(runtime *Runtime) {
|
||||
msg := fmt.Sprintf("RunRoot is pointing to a path (%s) which is not writable. Most likely podman will fail.", runtime.storageConfig.RunRoot)
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
// if dir does not exist, try to create it
|
||||
if err := os.MkdirAll(runtime.storageConfig.RunRoot, 0700); err != nil {
|
||||
if err := os.MkdirAll(runtime.storageConfig.RunRoot, 0o700); err != nil {
|
||||
logrus.Warn(msg)
|
||||
}
|
||||
} else {
|
||||
@@ -58,7 +58,7 @@ func (r *Runtime) checkBootID(runtimeAliveFile string) error {
|
||||
}
|
||||
} else {
|
||||
// Write the current boot ID to the alive file.
|
||||
if err := os.WriteFile(runtimeAliveFile, systemBootID, 0644); err != nil {
|
||||
if err := os.WriteFile(runtimeAliveFile, systemBootID, 0o644); err != nil {
|
||||
return fmt.Errorf("writing boot ID to runtime alive file: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user