createPipeline的时候,编译器提醒无法打开small.in,没生产此文件
func createPipeline(filename string, fileSize ,chunkCount int) <-chan int{ chunkSize := fileSize / chunkCount sortResults := []<-chan int{} for i:= 0; i < chunkCount; i++{ if err != nil{ panic(err) } file.Seek(int64(i * chunkSize),0) source := pipeline.ReaderSource(bufio.NewReader(file),chunkSize) sortResults = append(sortResults,pipeline.InMenSort(source)) } return pipeline.MergeN(sortResults...) }