command line download file from google drive

package main

import (
    "fmt"
    "io"
    "net/http"
    "os"
)

func downloadFile(url string, destination string) error {
    response, err := http.Get(url)
    if err != nil {
        return err
    }
    defer response.Body.Close()

    file, err := os.Create(destination)
    if err != nil {
        return err
    }
    defer file.Close()

    _, err = io.Copy(file, response.Body)
    if err != nil {
        return err
    }

    fmt.Println("Downloaded", destination)
    return nil
}

func main() {
    fileURL := "https://drive.google.com/uc?id=YOUR_FILE_ID"
    outputFile := "downloaded_file.txt"

    err := downloadFile(fileURL, outputFile)
    if err != nil {
        fmt.Println("Error:", err)
    }
}