Commit 21a255f0 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

gofmt -s.

parent 1cc3d953
......@@ -41,7 +41,7 @@ func BulkStat(parallelism int, files []string) float64 {
todo <- v
}
close(todo)
total := 0.0
for i := 0; i < parallelism; i++ {
total += float64(<-dts) / float64(time.Millisecond)
......
......@@ -224,7 +224,7 @@ func BenchmarkCFuseThreadedStat(b *testing.B) {
}
out := []string{}
for k, _ := range unique {
for k := range unique {
out = append(out, k)
}
......
package fuse
import (
"syscall"
"testing"
......
......@@ -215,7 +215,7 @@ func (me *Inode) getMountDirEntries() (out []DirEntry) {
me.treeLock.RLock()
defer me.treeLock.RUnlock()
for k, _ := range me.mounts {
for k := range me.mounts {
out = append(out, DirEntry{
Name: k,
Mode: S_IFDIR,
......
......@@ -65,7 +65,7 @@ func (me *LoopbackFileSystem) OpenDir(name string, context *Context) (stream cha
go func() {
for {
infos, err := f.Readdir(want)
for i, _ := range infos {
for i := range infos {
s := ToStatT(infos[i])
output <- DirEntry{
Name: infos[i].Name(),
......
......@@ -653,7 +653,7 @@ func TestLargeDirRead(t *testing.T) {
if total != created {
t.Errorf("readdir mismatch got %v wanted %v", total, created)
}
for k, _ := range nameSet {
for k := range nameSet {
_, ok := readSet[k]
if !ok {
t.Errorf("Name %v not found in output", k)
......
......@@ -72,7 +72,6 @@ func asSlice(ptr unsafe.Pointer, byteCount uintptr) []byte {
return *(*[]byte)(unsafe.Pointer(h))
}
func Version() string {
if version != nil {
return *version
......
......@@ -335,7 +335,7 @@ func getHandler(o opcode) *operationHandler {
func init() {
operationHandlers = make([]*operationHandler, _OPCODE_COUNT)
for i, _ := range operationHandlers {
for i := range operationHandlers {
operationHandlers[i] = &operationHandler{Name: "UNKNOWN"}
}
......
......@@ -67,7 +67,7 @@ func (me *XAttrTestFs) ListXAttr(name string, context *Context) (data []string,
return nil, ENOENT
}
for k, _ := range me.attrs {
for k := range me.attrs {
data = append(data, k)
}
return data, OK
......
......@@ -365,7 +365,7 @@ func (me *AutoUnionFs) OpenDir(name string, context *fuse.Context) (stream chan
stream = make(chan fuse.DirEntry, len(me.knownFileSystems)+5)
if name == _CONFIG {
for k, _ := range me.knownFileSystems {
for k := range me.knownFileSystems {
stream <- fuse.DirEntry{
Name: k,
Mode: syscall.S_IFLNK | 0644,
......
......@@ -619,7 +619,7 @@ func (me *UnionFs) promoteDirsTo(filename string) fuse.Status {
dirName = stripSlash(dirName)
}
for i, _ := range todo {
for i := range todo {
j := len(todo) - i - 1
d := todo[j]
r := results[j]
......@@ -718,7 +718,7 @@ func (me *UnionFs) OpenDir(directory string, context *fuse.Context) (stream chan
}()
entries := make([]map[string]uint32, len(me.fileSystems))
for i, _ := range me.fileSystems {
for i := range me.fileSystems {
entries[i] = make(map[string]uint32)
}
......
......@@ -252,7 +252,7 @@ func TestUnionFsDelete(t *testing.T) {
t.Fatal("Should have 1 deletion", names)
}
for k, _ := range names {
for k := range names {
c, err := ioutil.ReadFile(delPath + "/" + k)
CheckSuccess(err)
if string(c) != "file" {
......
......@@ -63,7 +63,7 @@ func (me *MultiZipFs) OpenDir(name string, context *fuse.Context) (stream chan f
}
if name == "config" {
for k, _ := range me.zips {
for k := range me.zips {
var d fuse.DirEntry
d.Name = k
d.Mode = fuse.S_IFLNK
......
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