Commit 7c991e45 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Run gofmt.

parent 29d35b93
...@@ -50,7 +50,7 @@ func (me *LatencyMap) add(name string, arg string, dtNs int64) { ...@@ -50,7 +50,7 @@ func (me *LatencyMap) add(name string, arg string, dtNs int64) {
me.stats[name] = e me.stats[name] = e
} }
e.count ++ e.count++
e.ns += dtNs e.ns += dtNs
if arg != "" { if arg != "" {
m, ok := me.secondaryStats[name] m, ok := me.secondaryStats[name]
......
package fuse package fuse
import ( import (
"fmt" "fmt"
"testing" "testing"
......
...@@ -76,7 +76,7 @@ func (me *FileSystemDebug) GetAttr(path string) (*Attr, Status) { ...@@ -76,7 +76,7 @@ func (me *FileSystemDebug) GetAttr(path string) (*Attr, Status) {
if path == DebugDir { if path == DebugDir {
return &Attr{ return &Attr{
Mode: S_IFDIR | 0755, Mode: S_IFDIR | 0755,
}, OK },OK
} }
c := me.getContent(path) c := me.getContent(path)
if c != nil { if c != nil {
...@@ -126,14 +126,13 @@ func (me *FileSystemDebug) OpenDir(name string) (stream chan DirEntry, status St ...@@ -126,14 +126,13 @@ func (me *FileSystemDebug) OpenDir(name string) (stream chan DirEntry, status St
stream = make(chan DirEntry, len(me.callbacks)) stream = make(chan DirEntry, len(me.callbacks))
for k, _ := range me.callbacks { for k, _ := range me.callbacks {
stream <- DirEntry { stream <- DirEntry{
Name: k, Name: k,
Mode: S_IFREG, Mode: S_IFREG,
} }
} }
close(stream) close(stream)
return stream, OK return stream, OK
} }
return me.Original.OpenDir(name) return me.Original.OpenDir(name)
} }
......
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
func TestPathDebug(t *testing.T) { func TestPathDebug(t *testing.T) {
debugFs := NewFileSystemDebug() debugFs := NewFileSystemDebug()
debugFs.Original = &DefaultFileSystem{} debugFs.Original = &DefaultFileSystem{}
debugFs.Add("test-entry", func()[]byte { return []byte("test-content"); }) debugFs.Add("test-entry", func() []byte { return []byte("test-content") })
connector := NewFileSystemConnector(debugFs) connector := NewFileSystemConnector(debugFs)
mountPoint := MakeTempDir() mountPoint := MakeTempDir()
......
...@@ -393,4 +393,3 @@ func (me *FileSystemConnector) Read(input *ReadIn, bp *BufferPool) ([]byte, Stat ...@@ -393,4 +393,3 @@ func (me *FileSystemConnector) Read(input *ReadIn, bp *BufferPool) ([]byte, Stat
f := me.getFile(input.Fh) f := me.getFile(input.Fh)
return f.Read(input, bp) return f.Read(input, bp)
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment