func firstPass(input string) []string {
	var (
		beg   = 0
		size  = len(input)
		lines = make([]string, 0)
	)

	for beg < size {
		end := beg
		for end < size && input[end] != carriageReturn && input[end] != newLine {
			end++
		}
		lines = append(lines, input[beg:end])

		for end < size && input[end] == carriageReturn {
			end++
		}

		beg = end + 1
	}

	return lines
}
/*
	First pass:
		- Fetch all lines from the input while skipping unnecessary line feeds.
*/
First pass:
Fetch all lines from the input while skipping unnecessary line feeds.
/ * First pass : - Fetch all lines from the input while skipping unnecessary line feeds . * /
func firstPass(input string) []string {
	var (
		beg   = 0
		size  = len(input)
		lines = make([]string, 0)
	)
	for beg < size {
		end := beg
		for end < size && input[end] != carriageReturn && input[end] != newLine {
			end++
		}
		lines = append(lines, input[beg:end])
		for end < size && input[end] == carriageReturn {
			end++
		}
		beg = end + 1
	}
	return lines
}
func firstPass ( input string ) [ ] string { var ( beg = 0 size = len ( input ) lines = make ( [ ] string , 0 ) ) for beg < size { end := beg for end < size && input [ end ] != carriageReturn && input [ end ] != newLine { end ++ } lines = append ( lines , input [ beg : end ] ) for end < size && input [ end ] == carriageReturn { end ++ } beg = end + 1 } return lines }
First pass:
Fetch all lines from the input while skipping unnecessary line feeds.
First pass : Fetch all lines from the input while skipping unnecessary line feeds .