func pieceEndFileIndex(pieceEndOffset int64, files []*File) int {
	for i, f := range files {
		if f.offset+f.length >= pieceEndOffset {
			return i + 1
		}
	}
	return 0
}
// Returns the index after the last file containing the piece. files must be
// ordered by offset.
Returns the index after the last file containing the piece. files must be
ordered by offset.
// Returns the index after the last file containing the piece . files must be // ordered by offset .
func pieceEndFileIndex(pieceEndOffset int64, files []*File) int {
	for i, f := range files {
		if f.offset+f.length >= pieceEndOffset {
			return i + 1
		}
	}
	return 0
}
func pieceEndFileIndex ( pieceEndOffset int64 , files [ ] * File ) int { for i , f := range files { if f . offset + f . length >= pieceEndOffset { return i + 1 } } return 0 }
Returns the index after the last file containing the piece.
Returns the index after the last file containing the piece .