Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix addition of empty newline to end of known_hosts
when cleaning the known_hosts file we are adding a newline to the end of the file, since the scanner returns the lines without '\n' character we are adding it to properly recreate the known_hosts file, but this ends up adding an extra newline at the end of the file this commit changes the splitFunc for bufio.Scanner which returns the lines with the '\n' character so that we don't have to add it so the extra newline at the end of the file is not added the splitFunc is a modified version of the ScanLines function from the bufio package with the change to return lines along with '\n'
- Loading branch information