func main() { if len(os.Args) < 2 { log.Fatal("Usage: hello MOUNTPOINT") } state, _, err := fuse.MountFileSystem(os.Args[1], &HelloFs{}, nil) if err != nil { log.Fatal("Mount fail:", err) } state.Loop(true) }
func main() { flag.Parse() if len(os.Args) < 2 { log.Fatal("Usage: ircfs MOUNTPOINT") } state, _, err := fuse.MountFileSystem(os.Args[1], &IrcFs{}, nil) if err != nil { log.Fatal("Mount fail:", err) } //go func() { for { sig := <-signal.Incoming // time.Sleep(1) // FIXME TODO XXX hack to make the goroutine scheduler switch // log.Print("Reading signal: " + sig.String() ) } }() state.Loop(true) }
func main() { go func() { for { sig := <-signal.Incoming time.Sleep(1) // FIXME TODO XXX hack to make the goroutine scheduler switch log.Print("Reading signal: " + sig.String()) } }() _, _, _ = fuse.MountFileSystem("foo", &StoopidFs{}, nil) for { time.Sleep(1e9) log.Print("ho") } }