docker-impl-go-templates
Installation
SKILL.md
docker-impl-go-templates
Quick Reference
Go Template Syntax Basics
| Syntax | Purpose | Example |
|---|---|---|
{{ .Field }} |
Access top-level field | {{ .State.Status }} |
{{ .Field.SubField }} |
Access nested field | {{ .NetworkSettings.IPAddress }} |
{{ json . }} |
Full JSON output | docker inspect --format='{{json .}}' |
{{ json .Field }} |
JSON for specific field | docker inspect --format='{{json .Config}}' |
table |
Table with headers | docker ps --format "table {{.Names}}\t{{.Status}}" |
\t |
Tab separator in tables | Used between columns |
{{ println }} |
Newline in output | Used inside range loops |
Template Functions
| Function | Purpose | Example |
Related skills