Open mchirico opened 3 years ago
mchirico, Thanks for opening this issue!
package main
import (
"fmt"
"io/ioutil"
)
func main() {
junk := []byte("here is my file. greygraypuff is chonky")
err := ioutil.WriteFile("myjunkfile.data", junk, 3000)
if err != nil {
fmt.Println(err)
}
data, err := ioutil.ReadFile("myjunkfile.data")
if err != nil {
fmt.Println(err)
}
fmt.Print(string(data))
}
video
Reading and Writing to Files
Samples to build from
Note, you can also append
Here's an example reading... note you have to specify number of bytes in
b