REST API v2 - list of images - mandatory Created attribute

fixes https://github.com/containers/podman/issues/8418

created attribute is missing for images with created datetime set to 0 Unix time (January 1, 1970 UTC) because 0 is considered as default value, and thus attribute was ommited because of 'omitempty' flag

Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
This commit is contained in:
Petr Sakař
2020-11-20 12:00:59 +01:00
parent a18365c908
commit e24e6b6372

View File

@ -51,10 +51,10 @@ func (i *Image) Id() string { // nolint
}
type ImageSummary struct {
ID string `json:"Id"`
ParentId string `json:",omitempty"` // nolint
RepoTags []string `json:",omitempty"`
Created int64 `json:",omitempty"`
ID string `json:"Id"`
ParentId string `json:",omitempty"` // nolint
RepoTags []string `json:",omitempty"`
Created int64
Size int64 `json:",omitempty"`
SharedSize int `json:",omitempty"`
VirtualSize int64 `json:",omitempty"`