golang decode base64 file

package main

import (
    "encoding/base64"
    "fmt"
    "io/ioutil"
)

func main() {
    // Specify the path to the base64 encoded file
    filePath := "path/to/your/base64/file.txt"

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

    // Decode the base64 content into a byte slice
    decodedContent, err := base64.StdEncoding.DecodeString(string(base64Content))
    if err != nil {
        fmt.Println("Error decoding base64:", err)
        return
    }

    // Use the decoded content as needed (e.g., write to another file, process data, etc.)
    fmt.Println("Decoded Content:", string(decodedContent))
}