summaryrefslogtreecommitdiff
path: root/docs-src/content/functions/sockaddr.yml
diff options
context:
space:
mode:
Diffstat (limited to 'docs-src/content/functions/sockaddr.yml')
-rw-r--r--docs-src/content/functions/sockaddr.yml11
1 files changed, 8 insertions, 3 deletions
diff --git a/docs-src/content/functions/sockaddr.yml b/docs-src/content/functions/sockaddr.yml
index f50af477..5992910c 100644
--- a/docs-src/content/functions/sockaddr.yml
+++ b/docs-src/content/functions/sockaddr.yml
@@ -15,10 +15,15 @@ preamble: |
To demonstrate how this can be used, here's an example that lists all of the IPv4 addresses available on the system:
- ```console
- $ gomplate -i '{{ range (sockaddr.GetAllInterfaces | sockaddr.Include "type" "ipv4") -}}
+ _in.tmpl:_
+ ```
+ {{ range (sockaddr.GetAllInterfaces | sockaddr.Include "type" "ipv4") -}}
{{ . | sockaddr.Attr "address" }}
- {{end}}'
+ {{end}}
+ ```
+
+ ```console
+ $ gomplate -f in.tmpl
127.0.0.1
10.0.0.8
132.79.79.79