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

gofmt -s.

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