On 1/24/20 1:07 PM, Robert P. J. Day wrote:
while "man podman-images" states that "created" is the default key for sorting images, it apparently does not point out that *any* invalid sort criteria you specify will use the sort criteria of "created".
i noticed this when i mistyped the sort criteria and, to my surprise, it worked fine, which now makes sense given the code in images.go:
func sortImagesOutput(sortBy string, imagesOutput imagesSorted) imagesSorted { switch sortBy { case "id": sort.Sort(imagesSortedID{imagesOutput}) case "size": sort.Sort(imagesSortedSize{imagesOutput}) case "tag": sort.Sort(imagesSortedTag{imagesOutput}) case "repository": sort.Sort(imagesSortedRepository{imagesOutput}) default: // default is created time sort.Sort(imagesSortedCreated{imagesOutput})
is that the intended behaviour? it caught me a bit off-guard.
rday
No I would think not. It should probably throw an error.