There are several levels you can hook into rclone
If you don't mind using the rclone config system then it is quite easy
package main
import (
"context"
"fmt"
"log"
//_ "github.com/rclone/rclone/backend/drive"
_ "github.com/rclone/rclone/backend/all"
"github.com/rclone/rclone/fs"
)
func main() {
f, err := fs.NewFs("drive:")
if err != nil {
log.Fatal(err)
}
entries, err := f.List(context.Background(), "")
if err != nil {
log.Fatal(err)
}
fmt.Println(entries)
for i, o := range entries {
fmt.Printf("object[%i] = (%T) %v\n", i, o, o)
}
}