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

Run gofmt.

parent 8bfc931c
......@@ -18,7 +18,7 @@ func main() {
deldirname := flag.String(
"deletion_dirname", "GOUNIONFS_DELETIONS", "Directory name to use for deletions.")
hide_readonly_link := flag.Bool("hide_readonly_link", true,
"Hides READONLY link from the top mountpoints. " +
"Hides READONLY link from the top mountpoints. "+
"Enabled by default.")
flag.Parse()
......
......@@ -17,7 +17,6 @@ type BufferPool interface {
}
type GcBufferPool struct {
}
// NewGcBufferPool is just a fallback to the standard allocation routines.
......
......@@ -33,6 +33,7 @@ type Handled struct {
}
const _ALREADY_MSG = "Object already has a handle"
////////////////////////////////////////////////////////////////
// portable version using 32 bit integers.
......
......@@ -283,9 +283,9 @@ func TestLinkExisting(t *testing.T) {
CheckSuccess(err)
var s1, s2 syscall.Stat_t
err = syscall.Lstat(me.mnt + "/file1", &s1)
err = syscall.Lstat(me.mnt+"/file1", &s1)
CheckSuccess(err)
err = syscall.Lstat(me.mnt + "/file2", &s2)
err = syscall.Lstat(me.mnt+"/file2", &s2)
CheckSuccess(err)
if s1.Ino != s2.Ino {
......@@ -313,12 +313,12 @@ func TestLinkForget(t *testing.T) {
CheckSuccess(err)
var s1, s2 syscall.Stat_t
err = syscall.Lstat(me.mnt + "/file1", &s1)
err = syscall.Lstat(me.mnt+"/file1", &s1)
CheckSuccess(err)
me.pathFs.ForgetClientInodes()
err = syscall.Lstat(me.mnt + "/file2", &s2)
err = syscall.Lstat(me.mnt+"/file2", &s2)
CheckSuccess(err)
if s1.Ino == s2.Ino {
t.Error("After forget, we should not export links")
......
......@@ -36,11 +36,11 @@ func TestLinkAt(t *testing.T) {
}
var s1, s2 syscall.Stat_t
err := syscall.Lstat(dir + "/a", &s1)
err := syscall.Lstat(dir+"/a", &s1)
if err != nil {
t.Fatalf("Lstat a: %v", err)
}
err = syscall.Lstat(dir + "/b", &s2)
err = syscall.Lstat(dir+"/b", &s2)
if err != nil {
t.Fatalf("Lstat b: %v", err)
}
......
......@@ -46,7 +46,7 @@ func TestOwnerDefault(t *testing.T) {
defer cleanup()
var stat syscall.Stat_t
err := syscall.Lstat(wd + "/foo", &stat)
err := syscall.Lstat(wd+"/foo", &stat)
CheckSuccess(err)
if int(stat.Uid) != os.Getuid() || int(stat.Gid) != os.Getgid() {
......@@ -59,7 +59,7 @@ func TestOwnerRoot(t *testing.T) {
defer cleanup()
var st syscall.Stat_t
err := syscall.Lstat(wd + "/foo", &st)
err := syscall.Lstat(wd+"/foo", &st)
CheckSuccess(err)
if st.Uid != _RANDOM_OWNER || st.Gid != _RANDOM_OWNER {
......@@ -72,7 +72,7 @@ func TestOwnerOverride(t *testing.T) {
defer cleanup()
var stat syscall.Stat_t
err := syscall.Lstat(wd + "/foo", &stat)
err := syscall.Lstat(wd+"/foo", &stat)
CheckSuccess(err)
if stat.Uid != 42 || stat.Gid != 43 {
......
......@@ -5,7 +5,6 @@ import (
"syscall"
)
const (
FUSE_ROOT_ID = 1
......
......@@ -82,7 +82,7 @@ func (me *AutoUnionFs) String() string {
func (me *AutoUnionFs) OnMount(nodeFs *fuse.PathNodeFs) {
me.nodeFs = nodeFs
if me.options.UpdateOnMount {
time.AfterFunc(100 * time.Millisecond, func() { me.updateKnownFses() })
time.AfterFunc(100*time.Millisecond, func() { me.updateKnownFses() })
}
}
......@@ -356,8 +356,8 @@ func (me *AutoUnionFs) DebugData() string {
}
setting := me.mountState.KernelSettings()
msg := fmt.Sprintf(
"Version: %v\n" +
"Bufferpool: %v\n" +
"Version: %v\n"+
"Bufferpool: %v\n"+
"Kernel: %v\n",
fuse.Version(),
me.mountState.BufferPoolStats(),
......
......@@ -14,7 +14,6 @@ import (
"time"
)
func filePathHash(path string) string {
dir, base := filepath.Split(path)
......
......@@ -26,7 +26,7 @@ var testOpts = UnionFsOptions{
DeletionCacheTTL: entryTtl,
DeletionDirName: "DELETIONS",
BranchCacheTTL: entryTtl,
HiddenFiles: []string{ "hidden" },
HiddenFiles: []string{"hidden"},
}
func freezeRo(dir string) {
......@@ -763,7 +763,7 @@ func TestUnionFsRmRf(t *testing.T) {
bin, err := exec.LookPath("rm")
CheckSuccess(err)
command := fmt.Sprintf("%s -f %s/mnt/dir", bin, wd);
command := fmt.Sprintf("%s -f %s/mnt/dir", bin, wd)
log.Printf("Command: %s", command)
names, _ := Readdirnames(wd + "/mnt/dir")
log.Printf("Contents of %s/mnt/dir: %s", wd, strings.Join(names, ", "))
......
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