// Less compares the date of the files stored at a and b as in
// "[a] modified < [b] modified". If both files were created in the same second
// the file names are compared by using a lexicographic string compare.
Less compares the date of the files stored at a and b as in
"[a] modified < [b] modified". If both files were created in the same second
the file names are compared by using a lexicographic string compare.
// Less compares the date of the files stored at a and b as in // " [ a ] modified < [ b ] modified " . If both files were created in the same second // the file names are compared by using a lexicographic string compare .
func (files FilesByDate) Less(a, b int) bool {
	timeA, timeB := files[a].ModTime().UnixNano(), files[b].ModTime().UnixNano()
	if timeA == timeB {
		return files[a].Name() < files[b].Name()
	}
	return timeA < timeB
}
func ( files FilesByDate ) Less ( a , b int ) bool { timeA , timeB := files [ a ] . ModTime ( ) . UnixNano ( ) , files [ b ] . ModTime ( ) . UnixNano ( ) if timeA == timeB { return files [ a ] . Name ( ) < files [ b ] . Name ( ) } return timeA < timeB }
Less compares the date of the files stored at a and b as in
"[a] modified < [b] modified".
Less compares the date of the files stored at a and b as in " [ a ] modified < [ b ] modified " .