pkg/loopback: format code with gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
b4d6eca9b8
commit
976da91fb7
1 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ func stringToLoopName(src string) [unix.LO_NAME_SIZE]uint8 {
|
|||
}
|
||||
|
||||
func getNextFreeLoopbackIndex() (int, error) {
|
||||
f, err := os.OpenFile("/dev/loop-control", os.O_RDONLY, 0644)
|
||||
f, err := os.OpenFile("/dev/loop-control", os.O_RDONLY, 0o644)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ func openNextAvailableLoopback(index int, sparseFile *os.File) (loopFile *os.Fil
|
|||
}
|
||||
|
||||
// OpenFile adds O_CLOEXEC
|
||||
loopFile, err = os.OpenFile(target, os.O_RDWR, 0644)
|
||||
loopFile, err = os.OpenFile(target, os.O_RDWR, 0o644)
|
||||
if err != nil {
|
||||
log.G(context.TODO()).Errorf("Error opening loopback device: %s", err)
|
||||
return nil, ErrAttachLoopbackDevice
|
||||
|
@ -99,7 +99,7 @@ func AttachLoopDevice(sparseName string) (loop *os.File, err error) {
|
|||
}
|
||||
|
||||
// OpenFile adds O_CLOEXEC
|
||||
sparseFile, err := os.OpenFile(sparseName, os.O_RDWR, 0644)
|
||||
sparseFile, err := os.OpenFile(sparseName, os.O_RDWR, 0o644)
|
||||
if err != nil {
|
||||
log.G(context.TODO()).Errorf("Error opening sparse file %s: %s", sparseName, err)
|
||||
return nil, ErrAttachLoopbackDevice
|
||||
|
|
Loading…
Add table
Reference in a new issue