afero/rclonetest/main.go

21 lines
277 B
Go
Raw Normal View History

2022-08-18 11:44:33 +03:00
package main
import (
2022-08-18 12:00:12 +03:00
"fmt"
2022-08-18 16:15:38 +03:00
"os"
2022-08-18 12:00:12 +03:00
2022-08-18 11:44:33 +03:00
"github.com/spf13/afero/rclonefs"
)
func main() {
2022-08-18 16:15:38 +03:00
RFS, _ := rclonefs.CreateRCFS("godrive1:")
2022-08-18 12:00:12 +03:00
2022-08-18 16:15:38 +03:00
data, err := RFS.ReadFile("mock.json")
if err != nil {
fmt.Printf("Error: %v\n", err)
os.Exit(1)
}
fmt.Printf("%s\n", string(data))
2022-08-18 11:44:33 +03:00
}