about summary refs log tree commit diff
path: root/templater/templater.go
diff options
context:
space:
mode:
authorStefan Magnus Landrø <stefan.landro@gmail.com>2017-10-17T20·49+0200
committerVincent Ambo <tazjin@gmail.com>2017-10-20T07·43+0200
commit68e2f99062952290b59699a83187e7a5058fac3d (patch)
tree2a03506ab4ea8c55a02f032b07d3916a92489505 /templater/templater.go
parentb20bc5f57a9e4e25760f03de752c2ed2811fa5fe (diff)
feat templater: Add IP lookup function
This introduces support for looking up IP addresses using local DNS resolver.

Function will return a list of all IP addresses associated with hostname.
Further processing can be achieved using supported list template functions.
Diffstat (limited to 'templater/templater.go')
-rw-r--r--templater/templater.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/templater/templater.go b/templater/templater.go
index f6878d3dfa03..c9260abc2111 100644
--- a/templater/templater.go
+++ b/templater/templater.go
@@ -180,6 +180,7 @@ func templateFuncs() template.FuncMap {
 		return string(b)
 	}
 	m["passLookup"] = GetFromPass
+	m["lookupIPAddr"] = GetIPsFromDNS
 
 	return m
 }