access file google collab

package main

import (
    "fmt"
    "io/ioutil"
)

func main() {
    // Specify the path to the file in Google Colab
    filePath := "/content/sample.txt"

    // Read the contents of the file
    content, err := ioutil.ReadFile(filePath)
    if err != nil {
        fmt.Println("Error reading file:", err)
        return
    }

    // Print the content of the file
    fmt.Println("File Content:")
    fmt.Println(string(content))
}