mirror of https://github.com/cirruslabs/tart.git
OCI: make annotations optional (#130)
* OCI: make annotations optional * Don't initialize annotations by default
This commit is contained in:
parent
8ed2ce159f
commit
b581db5be4
|
|
@ -11,7 +11,7 @@ struct OCIManifest: Codable, Equatable {
|
|||
var mediaType: String = ociManifestMediaType
|
||||
var config: OCIManifestConfig
|
||||
var layers: [OCIManifestLayer] = Array()
|
||||
var annotations: Dictionary<String, String> = Dictionary()
|
||||
var annotations: Dictionary<String, String>?
|
||||
|
||||
init(config: OCIManifestConfig, layers: [OCIManifestLayer], uncompressedDiskSize: UInt64? = nil) {
|
||||
self.config = config
|
||||
|
|
@ -29,7 +29,7 @@ struct OCIManifest: Codable, Equatable {
|
|||
}
|
||||
|
||||
func uncompressedDiskSize() -> UInt64? {
|
||||
guard let value = annotations[uncompressedDiskSizeAnnotation] else {
|
||||
guard let value = annotations?[uncompressedDiskSizeAnnotation] else {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue