spiegel_podman/cmd/podman/common
Garv Changrani d2b8502869 ps: fix label lookup in container and pod table headings
Table headings for `podman ps` and `podman pod ps` use a plain
`map[string]string`. A table template that calls `.Label` with an
argument fails while rendering the headings, before listing rows
are printed. For example: `podman ps --format 'table {{.Label "app"}}'`

Add a shared `PsHeader` type in `cmd/podman/common` with a `Label`
method that returns the requested label name as the column heading.
Use this type for both container and pod listings.

Add container unit tests and extend the existing container and pod
e2e tests to check label headings, label values, missing labels,
unlabeled objects, and `--noheading` output.

Fixes: #29831

Signed-off-by: Garv  Changrani <154041471+Garvity@users.noreply.github.com>
2026-09-29 11:29:57 +00:00
..
build.go build: do not leak context tmpdir 2026-08-21 08:17:58 +05:30
completion.go Merge pull request #29395 from scallaway/image-scp-compression 2026-09-17 17:09:06 +02:00
completion_test.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
create.go Merge pull request #27857 from arsenalzp/podman60_27724 2026-09-17 16:32:42 +02:00
create_opts.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
create_test.go cmd/podman: replace strings.Split with strings.Cut 2026-05-22 12:36:26 -07:00
default.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
format.go ps: fix label lookup in container and pod table headings 2026-09-29 11:29:57 +00:00
inspect.go Add artifact fallback to podman inspect command 2025-10-02 06:52:32 -04:00
netflags.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
sign.go Fix staticcheck SA4023 warnings in call.go and sign.go 2026-06-12 09:53:20 +02:00
term.go remove github.com/buger/goterm dependency 2025-03-31 19:17:55 +02:00