// readLines reads contents from file and split by new line.
readLines reads contents from file and split by new line.
// readLines reads contents from file and split by new line .
func readLines(filename string) ([]string, error) {
	f, err := os.Open(filename)
	if err != nil {
		return []string{""}, err
	}
	defer f.Close()
	ret := make([]string, 0)
	r := bufio.NewReader(f)
	line, err := r.ReadString('\n')
	for err == nil {
		ret = append(ret, strings.Trim(line, "\n"))
		line, err = r.ReadString('\n')
	}
	return ret, err
}
func readLines ( filename string ) ( [ ] string , error ) { f , err := os . Open ( filename ) if err != nil { return [ ] string { " " } , err } defer f . Close ( ) ret := make ( [ ] string , 0 ) r := bufio . NewReader ( f ) line , err := r . ReadString ( '\n' ) for err == nil { ret = append ( ret , strings . Trim ( line , " \n " ) ) line , err = r . ReadString ( '\n' ) } return ret , err }
readLines reads contents from file and split by new line.
readLines reads contents from file and split by new line .