summaryrefslogtreecommitdiffhomepage
path: root/runsc/fsgofer
diff options
context:
space:
mode:
authorRobert Tonic <btonic@users.noreply.github.com>2019-09-05 17:12:09 -0400
committerRobert Tonic <btonic@users.noreply.github.com>2019-09-05 17:12:09 -0400
commitc2ae77a607b6e103545aa83e8f2c7c5bf649846f (patch)
treef49a84085d2b88619861cea10ab3c0b104fe27f5 /runsc/fsgofer
parent4288a578832eae652f73ae411ece2d4b6590062e (diff)
Apply go fmt to the fsgofer changes.
Diffstat (limited to 'runsc/fsgofer')
-rw-r--r--runsc/fsgofer/fsgofer.go38
1 files changed, 19 insertions, 19 deletions
diff --git a/runsc/fsgofer/fsgofer.go b/runsc/fsgofer/fsgofer.go
index e3b926798..89171c811 100644
--- a/runsc/fsgofer/fsgofer.go
+++ b/runsc/fsgofer/fsgofer.go
@@ -131,30 +131,30 @@ func (a *attachPoint) Attach() (p9.File, error) {
// Hold the file descriptor we are converting into a p9.File
var f *fd.FD
- // Apply the S_IFMT bitmask so we can detect file type appropriately
+ // Apply the S_IFMT bitmask so we can detect file type appropriately
switch fmtStat := stat.Mode & syscall.S_IFMT; {
case fmtStat == syscall.S_IFSOCK:
- // Attempt to open a connection. Bubble up the failures.
- f, err = fd.OpenUnix(a.prefix)
- if err != nil {
- return nil, err
- }
+ // Attempt to open a connection. Bubble up the failures.
+ f, err = fd.OpenUnix(a.prefix)
+ if err != nil {
+ return nil, err
+ }
- default:
- // Default to Read/Write permissions.
- mode := syscall.O_RDWR
+ default:
+ // Default to Read/Write permissions.
+ mode := syscall.O_RDWR
- // If the configuration is Read Only & the mount point is a directory,
- // set the mode to Read Only.
- if a.conf.ROMount || fmtStat == syscall.S_IFDIR {
- mode = syscall.O_RDONLY
- }
+ // If the configuration is Read Only & the mount point is a directory,
+ // set the mode to Read Only.
+ if a.conf.ROMount || fmtStat == syscall.S_IFDIR {
+ mode = syscall.O_RDONLY
+ }
- // Open the mount point & capture the FD.
- f, err = fd.Open(a.prefix, openFlags|mode, 0)
- if err != nil {
- return nil, fmt.Errorf("unable to open file %q, err: %v", a.prefix, err)
- }
+ // Open the mount point & capture the FD.
+ f, err = fd.Open(a.prefix, openFlags|mode, 0)
+ if err != nil {
+ return nil, fmt.Errorf("unable to open file %q, err: %v", a.prefix, err)
+ }
}
// Close the connection if the UDS is already attached.