Answers for "read a file string golang"

2

golang read file

dat, err := ioutil.ReadFile("/tmp/dat")
    check(err)
    fmt.Print(string(dat))
Posted by: Guest on November-02-2020
0

golang read file to string

contents, err := ioutil.ReadFile("file.txt")
Posted by: Guest on March-25-2021

Browse Popular Code Answers by Language