Skip to content

docs: show how to read map keys with special characters in inspect - #7152

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:docs/inspect-label-index-format
Open

docs: show how to read map keys with special characters in inspect#7152
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:docs/inspect-label-index-format

Conversation

@locker95

Copy link
Copy Markdown

People keep hitting template parse errors when they try things like {{.Config.Labels.org.label-schema.name}} for label keys with dots/hyphens.

Adds a short section that uses index for labels (plus the Windows quoting form), and notes the same pattern works for network names.

Fixes#2685

Go field syntax only works for identifier-like keys. Labels and network
names often contain dots or hyphens, so document index-based access and a
Windows quoting example.
Fixesdocker#2685
Signed-off-by: Dean Chen <862469039@qq.com>
@locker95
locker95 requested review from a team and thaJeztah as code ownersAugust 5, 2026 18:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker inspect format extracting single label values

1 participant

@locker95