func main() { flag.Parse() if len(flag.Args()) < 1 { log.Fatal("Usage:\n dropboxfs MOUNTPOINT") } err := fs.LoadConfig() if err != nil { log.Fatalf("Config fail: %v\n", err) } fs.CacheInit() fs.MountFs(flag.Arg(0)) }
func setup() { fs.LoadConfig() fs.LoadSession() // Upload test file file, err := ioutil.ReadFile("./test_files/hello_world.txt") if err != nil { log.Fatalf("Setup Error: %v\n", err) } _, err = dropbox.UploadFile(fs.Session, file, uri, nil) if err != nil { log.Fatalf("Upload Error: %v\n", err) } }