code: func (p *Path) IntersectionLine(line *Line) ([]*Point, [][2]int) {
  	var points []*Point
  	var indexes [][2]int
  
  	for i := 0; i < len(p.PointSet)-1; i++ {
  		pTest := NewLine(&p.PointSet[i], &p.PointSet[i+1])
  		if point := pTest.Intersection(line); point != nil {
  			points = append(points, point)
  			indexes = append(indexes, [2]int{i, 0})
  		}
  	}
  
  	return points, indexes
  }
docs: // IntersectionLine returns a slice of points and a slice of tuples [i, 0] where i is the segment
  // in path that intersects with the line at the given point.
  // Slices will be empty if there is no intersection.