Commit 116a24d5 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Remove unused imports.

parent 22637a49
...@@ -6,9 +6,7 @@ package main ...@@ -6,9 +6,7 @@ package main
import ( import (
"flag" "flag"
"fmt" "fmt"
"log"
"os" "os"
"runtime"
"time" "time"
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
...@@ -16,9 +14,6 @@ import ( ...@@ -16,9 +14,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
) )
var _ = runtime.GOMAXPROCS
var _ = log.Print
func main() { func main() {
// Scans the arg list and sets up flags // Scans the arg list and sets up flags
debug := flag.Bool("debug", false, "print debugging messages.") debug := flag.Bool("debug", false, "print debugging messages.")
......
...@@ -3,7 +3,6 @@ package main ...@@ -3,7 +3,6 @@ package main
import ( import (
"flag" "flag"
"fmt" "fmt"
"log"
"os" "os"
"path/filepath" "path/filepath"
...@@ -12,8 +11,6 @@ import ( ...@@ -12,8 +11,6 @@ import (
"github.com/hanwen/go-fuse/zipfs" "github.com/hanwen/go-fuse/zipfs"
) )
var _ = log.Printf
func main() { func main() {
// Scans the arg list and sets up flags // Scans the arg list and sets up flags
debug := flag.Bool("debug", false, "debug on") debug := flag.Bool("debug", false, "debug on")
......
...@@ -15,8 +15,6 @@ import ( ...@@ -15,8 +15,6 @@ import (
"time" "time"
) )
var _ = log.Printf
func main() { func main() {
// Scans the arg list and sets up flags // Scans the arg list and sets up flags
debug := flag.Bool("debug", false, "print debugging messages.") debug := flag.Bool("debug", false, "print debugging messages.")
......
package fuse package fuse
import ( import (
"fmt"
"testing" "testing"
) )
var _ = fmt.Println
func TestBufferPool(t *testing.T) { func TestBufferPool(t *testing.T) {
bp := NewBufferPool() bp := NewBufferPool()
......
...@@ -9,8 +9,6 @@ import ( ...@@ -9,8 +9,6 @@ import (
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
) )
var _ = fmt.Println
// DataFile is for implementing read-only filesystems. This // DataFile is for implementing read-only filesystems. This
// assumes we already have the data in memory. // assumes we already have the data in memory.
type dataFile struct { type dataFile struct {
...@@ -108,8 +106,6 @@ type loopbackFile struct { ...@@ -108,8 +106,6 @@ type loopbackFile struct {
lock sync.Mutex lock sync.Mutex
} }
var _ = (File)((*loopbackFile)(nil))
func (f *loopbackFile) InnerFile() File { func (f *loopbackFile) InnerFile() File {
return nil return nil
} }
...@@ -217,8 +213,6 @@ type readOnlyFile struct { ...@@ -217,8 +213,6 @@ type readOnlyFile struct {
File File
} }
var _ = (File)((*readOnlyFile)(nil))
func (f *readOnlyFile) String() string { func (f *readOnlyFile) String() string {
return fmt.Sprintf("readOnlyFile(%s)", f.File.String()) return fmt.Sprintf("readOnlyFile(%s)", f.File.String())
} }
......
...@@ -8,8 +8,6 @@ import ( ...@@ -8,8 +8,6 @@ import (
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
) )
var _ = log.Println
// openedFile stores either an open dir or an open file. // openedFile stores either an open dir or an open file.
type openedFile struct { type openedFile struct {
handled handled
......
...@@ -13,8 +13,6 @@ import ( ...@@ -13,8 +13,6 @@ import (
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
) )
var _ = log.Println
// Returns the RawFileSystem so it can be mounted. // Returns the RawFileSystem so it can be mounted.
func (c *FileSystemConnector) RawFS() fuse.RawFileSystem { func (c *FileSystemConnector) RawFS() fuse.RawFileSystem {
return (*rawBridge)(c) return (*rawBridge)(c)
......
package nodefs package nodefs
import ( import (
"log"
"strings" "strings"
"testing" "testing"
"unsafe" "unsafe"
) )
var _ = log.Println
func markSeen(t *testing.T, substr string) { func markSeen(t *testing.T, substr string) {
if r := recover(); r != nil { if r := recover(); r != nil {
s := r.(string) s := r.(string)
......
...@@ -2,7 +2,6 @@ package nodefs ...@@ -2,7 +2,6 @@ package nodefs
import ( import (
"io/ioutil" "io/ioutil"
"log"
"os" "os"
"testing" "testing"
"time" "time"
...@@ -10,8 +9,6 @@ import ( ...@@ -10,8 +9,6 @@ import (
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
) )
var _ = log.Println
const testTtl = 100 * time.Millisecond const testTtl = 100 * time.Millisecond
func setupMemNodeTest(t *testing.T) (wd string, fs FileSystem, clean func()) { func setupMemNodeTest(t *testing.T) (wd string, fs FileSystem, clean func()) {
......
...@@ -2,15 +2,11 @@ package fuse ...@@ -2,15 +2,11 @@ package fuse
import ( import (
"bytes" "bytes"
"fmt"
"log" "log"
"reflect" "reflect"
"unsafe" "unsafe"
) )
var _ = log.Printf
var _ = fmt.Printf
const ( const (
_OP_LOOKUP = int32(1) _OP_LOOKUP = int32(1)
_OP_FORGET = int32(2) _OP_FORGET = int32(2)
......
package pathfs package pathfs
import ( import (
"fmt"
"io" "io"
"log" "log"
"os" "os"
...@@ -13,9 +12,6 @@ import ( ...@@ -13,9 +12,6 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/nodefs"
) )
var _ = fmt.Println
var _ = log.Println
type loopbackFileSystem struct { type loopbackFileSystem struct {
// TODO - this should need default fill in. // TODO - this should need default fill in.
FileSystem FileSystem
...@@ -61,8 +57,6 @@ func (fs *loopbackFileSystem) GetAttr(name string, context *fuse.Context) (a *fu ...@@ -61,8 +57,6 @@ func (fs *loopbackFileSystem) GetAttr(name string, context *fuse.Context) (a *fu
return a, fuse.OK return a, fuse.OK
} }
var _ = (FileSystem)((*loopbackFileSystem)(nil))
func (fs *loopbackFileSystem) OpenDir(name string, context *fuse.Context) (stream []fuse.DirEntry, status fuse.Status) { func (fs *loopbackFileSystem) OpenDir(name string, context *fuse.Context) (stream []fuse.DirEntry, status fuse.Status) {
// What other ways beyond O_RDONLY are there to open // What other ways beyond O_RDONLY are there to open
// directories? // directories?
......
...@@ -12,8 +12,6 @@ import ( ...@@ -12,8 +12,6 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/nodefs"
) )
var _ = log.Println
// A parent pointer: node should be reachable as parent.children[name] // A parent pointer: node should be reachable as parent.children[name]
type clientInodePath struct { type clientInodePath struct {
parent *pathInode parent *pathInode
......
...@@ -18,8 +18,6 @@ type readonlyFileSystem struct { ...@@ -18,8 +18,6 @@ type readonlyFileSystem struct {
FileSystem FileSystem
} }
var _ = (FileSystem)((*readonlyFileSystem)(nil))
func (fs *readonlyFileSystem) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status) { func (fs *readonlyFileSystem) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status) {
return fs.FileSystem.GetAttr(name, context) return fs.FileSystem.GetAttr(name, context)
} }
......
...@@ -3,7 +3,6 @@ package pathfs ...@@ -3,7 +3,6 @@ package pathfs
import ( import (
"bytes" "bytes"
"io/ioutil" "io/ioutil"
"log"
"os" "os"
"path/filepath" "path/filepath"
"syscall" "syscall"
...@@ -13,8 +12,6 @@ import ( ...@@ -13,8 +12,6 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/nodefs"
) )
var _ = log.Print
var xattrGolden = map[string][]byte{ var xattrGolden = map[string][]byte{
"user.attr1": []byte("val1"), "user.attr1": []byte("val1"),
"user.attr2": []byte("val2")} "user.attr2": []byte("val2")}
......
...@@ -10,7 +10,6 @@ import ( ...@@ -10,7 +10,6 @@ import (
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/raw"
) )
type cacheFs struct { type cacheFs struct {
...@@ -24,7 +23,7 @@ func (fs *cacheFs) Open(name string, flags uint32, context *fuse.Context) (fuseF ...@@ -24,7 +23,7 @@ func (fs *cacheFs) Open(name string, flags uint32, context *fuse.Context) (fuseF
} }
return &nodefs.WithFlags{ return &nodefs.WithFlags{
File: f, File: f,
FuseFlags: raw.FOPEN_KEEP_CACHE, FuseFlags: fuse.FOPEN_KEEP_CACHE,
}, c }, c
} }
...@@ -127,7 +126,7 @@ func (fs *nonseekFs) Open(name string, flags uint32, context *fuse.Context) (fus ...@@ -127,7 +126,7 @@ func (fs *nonseekFs) Open(name string, flags uint32, context *fuse.Context) (fus
f := nodefs.NewDataFile(data) f := nodefs.NewDataFile(data)
return &nodefs.WithFlags{ return &nodefs.WithFlags{
File: f, File: f,
FuseFlags: raw.FOPEN_NONSEEKABLE, FuseFlags: fuse.FOPEN_NONSEEKABLE,
}, fuse.OK }, fuse.OK
} }
......
...@@ -10,7 +10,6 @@ import ( ...@@ -10,7 +10,6 @@ import (
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/raw"
) )
type MutableDataFile struct { type MutableDataFile struct {
...@@ -149,7 +148,7 @@ func setupFAttrTest(t *testing.T, fs pathfs.FileSystem) (dir string, clean func( ...@@ -149,7 +148,7 @@ func setupFAttrTest(t *testing.T, fs pathfs.FileSystem) (dir string, clean func(
// Trigger INIT. // Trigger INIT.
os.Lstat(dir) os.Lstat(dir)
if state.KernelSettings().Flags&raw.CAP_FILE_OPS == 0 { if state.KernelSettings().Flags&fuse.CAP_FILE_OPS == 0 {
t.Log("Mount does not support file operations") t.Log("Mount does not support file operations")
} }
......
...@@ -4,13 +4,11 @@ import ( ...@@ -4,13 +4,11 @@ import (
"fmt" "fmt"
"io" "io"
"io/ioutil" "io/ioutil"
"log"
"math/rand" "math/rand"
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"runtime" "runtime"
"strings"
"syscall" "syscall"
"testing" "testing"
"time" "time"
...@@ -20,12 +18,6 @@ import ( ...@@ -20,12 +18,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
) )
var _ = strings.Join
var _ = log.Println
////////////////
// state for our testcase, mostly constants
const mode uint32 = 0757 const mode uint32 = 0757
type testCase struct { type testCase struct {
......
...@@ -10,8 +10,6 @@ import ( ...@@ -10,8 +10,6 @@ import (
"syscall" "syscall"
) )
var _ = log.Println
var maxPipeSize int var maxPipeSize int
var resizable bool var resizable bool
......
package unionfs package unionfs
import ( import (
"fmt"
"io/ioutil" "io/ioutil"
"log" "log"
"os" "os"
...@@ -13,9 +12,6 @@ import ( ...@@ -13,9 +12,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
) )
var _ = fmt.Print
var _ = log.Print
const entryTtl = 100 * time.Millisecond const entryTtl = 100 * time.Millisecond
var testAOpts = AutoUnionFsOptions{ var testAOpts = AutoUnionFsOptions{
......
...@@ -11,8 +11,6 @@ import ( ...@@ -11,8 +11,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
) )
var _ = fmt.Println
const _XATTRSEP = "@XATTR@" const _XATTRSEP = "@XATTR@"
type attrResponse struct { type attrResponse struct {
......
package unionfs package unionfs
import ( import (
"fmt"
"io/ioutil" "io/ioutil"
"log"
"os" "os"
"syscall" "syscall"
"testing" "testing"
...@@ -12,9 +10,6 @@ import ( ...@@ -12,9 +10,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
) )
var _ = fmt.Print
var _ = log.Print
func modeMapEq(m1, m2 map[string]uint32) bool { func modeMapEq(m1, m2 map[string]uint32) bool {
if len(m1) != len(m2) { if len(m1) != len(m2) {
return false return false
......
package unionfs package unionfs
import ( import (
"log"
"sync" "sync"
"time" "time"
) )
var _ = log.Println
type cacheEntry struct { type cacheEntry struct {
data interface{} data interface{}
......
package unionfs package unionfs
import ( import (
"fmt"
"log"
"testing" "testing"
"time" "time"
) )
var _ = fmt.Print
var _ = log.Print
func TestTimedCacheUncacheable(t *testing.T) { func TestTimedCacheUncacheable(t *testing.T) {
fetchCount := 0 fetchCount := 0
fetch := func(n string) (interface{}, bool) { fetch := func(n string) (interface{}, bool) {
......
...@@ -20,9 +20,6 @@ import ( ...@@ -20,9 +20,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
) )
var _ = fmt.Print
var _ = log.Print
func TestFilePathHash(t *testing.T) { func TestFilePathHash(t *testing.T) {
// Simple test coverage. // Simple test coverage.
t.Log(filePathHash("xyz/abc")) t.Log(filePathHash("xyz/abc"))
......
...@@ -19,9 +19,6 @@ import ( ...@@ -19,9 +19,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
) )
var _ = log.Printf
var _ = (pathfs.FileSystem)((*MultiZipFs)(nil))
const ( const (
CONFIG_PREFIX = "config/" CONFIG_PREFIX = "config/"
) )
......
...@@ -5,7 +5,6 @@ import ( ...@@ -5,7 +5,6 @@ import (
"bytes" "bytes"
"compress/bzip2" "compress/bzip2"
"compress/gzip" "compress/gzip"
"fmt"
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
"io" "io"
"os" "os"
...@@ -13,8 +12,6 @@ import ( ...@@ -13,8 +12,6 @@ import (
"syscall" "syscall"
) )
var _ = fmt.Println
// TODO - handle symlinks. // TODO - handle symlinks.
func HeaderToFileInfo(out *fuse.Attr, h *tar.Header) { func HeaderToFileInfo(out *fuse.Attr, h *tar.Header) {
......
...@@ -7,14 +7,11 @@ import ( ...@@ -7,14 +7,11 @@ import (
"fmt" "fmt"
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
"io" "io"
"log"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
) )
var _ = log.Printf
type ZipFile struct { type ZipFile struct {
*zip.File *zip.File
} }
......
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