Commit a3347006 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Run gofmt.

parent 0bf98e92
......@@ -50,4 +50,3 @@ func (m *LatencyMap) Counts() map[string]int {
return r
}
......@@ -7,10 +7,10 @@ import (
func TestLatencyMap(t *testing.T) {
m := NewLatencyMap()
m.Add("foo", 100 * time.Millisecond)
m.Add("foo", 200 * time.Millisecond)
m.Add("foo", 100*time.Millisecond)
m.Add("foo", 200*time.Millisecond)
c, d := m.Get("foo")
if c != 2 || d != 300 * time.Millisecond {
if c != 2 || d != 300*time.Millisecond {
t.Errorf("got %v, %d, want 2, 150ms", c, d)
}
}
......@@ -48,7 +48,7 @@ func main() {
mOpts := &fuse.MountOptions{
AllowOther: *other,
}
state, err := fuse.NewServer(conn.RawFS(),mountPoint, mOpts)
state, err := fuse.NewServer(conn.RawFS(), mountPoint, mOpts)
if err != nil {
fmt.Printf("Mount fail: %v\n", err)
os.Exit(1)
......
......@@ -25,7 +25,7 @@ func main() {
prefix := flag.Arg(1)
fs := nodefs.NewMemNodeFs(prefix)
conn := nodefs.NewFileSystemConnector(fs, nil)
server, err := fuse.NewServer(conn.RawFS(),mountPoint, nil)
server, err := fuse.NewServer(conn.RawFS(), mountPoint, nil)
if err != nil {
fmt.Printf("Mount fail: %v\n", err)
os.Exit(1)
......
......@@ -313,7 +313,6 @@ func (m *int64HandleMap) Handle(obj *handled) (handle uint64) {
return m.handle(obj)
}
func (m *int64HandleMap) Forget(handle uint64, count int) (forgotten bool, obj *handled) {
defer m.verify()
obj = m.Decode(handle)
......
......@@ -2,8 +2,8 @@ package nodefs
import (
"fmt"
"time"
"sync"
"time"
"github.com/hanwen/go-fuse/fuse"
)
......
......@@ -222,7 +222,7 @@ func TestFSetAttr(t *testing.T) {
a, status = fs.GetAttr("file", nil)
if !status.Ok() || a.Mode&07777 != 024 {
t.Errorf("chmod: %o, status %v", a.Mode & 0777, status)
t.Errorf("chmod: %o, status %v", a.Mode&0777, status)
}
err = os.Chtimes(fn, time.Unix(0, 100e3), time.Unix(0, 101e3))
......
......@@ -1142,7 +1142,7 @@ func TestUnionFsDisappearing(t *testing.T) {
t.Fatalf("Mkdir failed: %v", err)
}
wrFs := newDisappearingFS(pathfs.NewLoopbackFileSystem(wd + "/rw"),
wrFs := newDisappearingFS(pathfs.NewLoopbackFileSystem(wd+"/rw"),
pathfs.NewLoopbackFileSystem("/dev/null"))
var fses []pathfs.FileSystem
fses = append(fses, pathfs.NewLockingFileSystem(wrFs))
......
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