In Go, I am trying to write data to a temp file that I then turn around and read but have not been successful. Below is a stripped down test program. I have verified that the
package main import ( "fmt" "io/ioutil" "log" ) func main() { content, err := ioutil.ReadFile("testdata/hello") if err != nil { log.Fatal(err) } fmt.Printf("File contents: %s", content)
according to the official golang docs.