(names []string, isDeprecated func(id string) bool)
| 276 | } |
| 277 | |
| 278 | func toAlgorithmInfo(names []string, isDeprecated func(id string) bool) []serverapi.AlgorithmInfo { |
| 279 | var result []serverapi.AlgorithmInfo |
| 280 | |
| 281 | for _, n := range names { |
| 282 | result = append(result, serverapi.AlgorithmInfo{ |
| 283 | ID: n, |
| 284 | Deprecated: isDeprecated(n), |
| 285 | }) |
| 286 | } |
| 287 | |
| 288 | return result |
| 289 | } |
| 290 | |
| 291 | func sortAlgorithms(a []serverapi.AlgorithmInfo) { |
| 292 | sort.Slice(a, func(i, j int) bool { |
no outgoing calls
no test coverage detected