Hans Lemurson
0
Q:

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")
0

New to Communities?

Join the community