open file golang code example
Example 1: golang read file
dat, err := ioutil.ReadFile("/tmp/dat")
check(err)
fmt.Print(string(dat))
Example 2: golang remove file
err := os.Remove("path/to/file.format")
dat, err := ioutil.ReadFile("/tmp/dat")
check(err)
fmt.Print(string(dat))
err := os.Remove("path/to/file.format")