Golang writefile пример
err := os.WriteFile("index.txt", []byte("example writefile using go"), os.ModePerm)
if err != nil {
fmt.Println(err)
}
res, _ := os.ReadFile("index.txt")
fmt.Println(string(res))
Restu Wahyu Saputra