When I run podman inspect
I can get to a map[...]
with --format
. But indexing through it seems to be impossible.
$ podman run -d -p 1234:1234 --name evanrox alpine:3 sleep 360
$ podman inspect evanrox --format '{{ .NetworkSettings.Ports }}'
map[1234/tcp:[{ 1234}]]
However, these don't work,
--format '{{ .NetworkSettings.Ports.1234/tcp }}'
--format '{{ .NetworkSettings.Ports."1234/tcp" }}'
--format '{{ .NetworkSettings.Ports.[1234/tcp] }}'
--format '{{ .NetworkSettings.Ports.["1234/tcp"] }}'
I don't write Go. What's the right syntax?