()
| 142 | } |
| 143 | |
| 144 | func defaultScoreParams() scoreParams { |
| 145 | return scoreParams{ |
| 146 | BasenameMatch: 6.0, |
| 147 | BasenamePrefix: 3.5, |
| 148 | ExactSegment: 2.5, |
| 149 | BoundaryHit: 1.8, |
| 150 | ContiguousRun: 1.2, |
| 151 | DirTokenHit: 0.4, |
| 152 | DepthPenalty: 0.08, |
| 153 | LengthPenalty: 0.01, |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | func isSubsequence(haystack, needle []byte) bool { |
| 158 | if len(needle) == 0 { |