MCPcopy
hub / github.com/kopia/kopia / toAlgorithmInfo

Function toAlgorithmInfo

internal/server/api_repo.go:278–289  ·  view source on GitHub ↗
(names []string, isDeprecated func(id string) bool)

Source from the content-addressed store, hash-verified

276}
277
278func 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
291func sortAlgorithms(a []serverapi.AlgorithmInfo) {
292 sort.Slice(a, func(i, j int) bool {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected