Read text file into string array (and write)

The ability to read (and write) a text file into and out of a string array is I believe a fairly common requirement. It is also quite useful when starting with a language removing the need initially to access a database. Does one exist in Golang?

func ReadLines(sFileName string, iMinLines int) ([]string, bool) {


func WriteLines(saBuff[]string, sFilename string) (bool) { 

I would prefer to use an existing one rather than duplicate.

1 Like