summaryrefslogtreecommitdiff
path: root/test/README.md
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-08-26 21:44:53 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-08-27 10:28:15 +0200
commitab6c43f3e072d088149c4f5371e0e53ff14ec7ff (patch)
tree7fc34428445851eb790943050a4c68074a516133 /test/README.md
parent94c37d7d470871f9d63b32c97094f5faab1e8a08 (diff)
downloadpodman-ab6c43f3e072d088149c4f5371e0e53ff14ec7ff.tar.gz
podman-ab6c43f3e072d088149c4f5371e0e53ff14ec7ff.tar.bz2
podman-ab6c43f3e072d088149c4f5371e0e53ff14ec7ff.zip
Shell completion for --format with anonymous fields
In commit d81021ed265e I introduced shell completion for the `--format` flag. This is a very nice way to complete go template field names. However it did not work correct for anonymous fields. In this case the child fields can be accessed directly from the parent. For example: ``` type Anonymous struct { Field1 string Field2 string ... } type MyType struct { Anonymous } var s = MyType{} ``` Now if you want to access a field from the Anonymous struct you can just do `s.Field1`. The same is allowed for go templates, using `{{.Field1}}` should work. This commit adds this functionality, if the field is anonymous read the child field names recursively and add them to the suggestions. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/README.md')
0 files changed, 0 insertions, 0 deletions