Answers for "golang read file into string"

0

golang read file to string

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

read contents of a file and convert to list + go

content, err := ioutil.ReadFile(filename)
if err != nil {
    //Do something
}
lines := strings.Split(string(content), "n")
Posted by: Guest on August-05-2020

Browse Popular Code Answers by Language