Hi i have a implementation to read a file Line Feed, but it does not work to Carriage Return files the implementation is:
file, err := os.Open(filePath)
if err != nil {
ross := int32(1)
fileValidation = append(fileValidation, p.createPharmacyPanelLoaderResultErr(pharmacyPanel, &ross, err.Error(), err.Error()))
return nil, fileValidation, int32(0)
}
scanner := bufio.NewScanner(file)
for i := 0; scanner.Scan(); i++ {
line := scanner.Text()
}
i want to transform this function to can work with both Carriage Return and Line Feed