try implementing a command that can search the index for packages

This commit is contained in:
2024-11-15 19:54:35 +11:00
parent 14bd390114
commit 7e403d64e0
11 changed files with 206 additions and 61 deletions

View File

@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
struct ApkIndex {
let packages: [ApkIndexPackage]
public struct ApkIndex {
public let packages: [ApkIndexPackage]
}
extension ApkIndex {
@ -15,7 +15,7 @@ extension ApkIndex {
}
}
extension ApkIndex {
public extension ApkIndex {
static func merge<S: Sequence>(_ tables: S) -> Self where S.Element == Self {
Self.init(packages: tables.flatMap(\.packages))
}
@ -34,7 +34,7 @@ extension ApkIndex {
}
extension ApkIndex: CustomStringConvertible {
var description: String {
public var description: String {
self.packages.map(String.init).joined(separator: "\n")
}
}