A template pipeline passes each command’s output to the next command as input. Write it with the pipe character: {{ func1 . | func2 }} is equivalent to func2(func1(.)), and pipelines can contain any number of stages. section 11.5.2
Register the functions a template may call with Funcs, then chain those functions where each transformation depends on the previous result. The same value can also be emphasized explicitly: {{ . | len }} and {{ len . }} produce the same length. section 11.5.2
Normalize hostnames
Extract a hostname, lowercase it, and print each result on its own line with {{range .}}{{extractDomainNames . | lower | println}}{{end }}. For URLs including http://UN.org, the output includes un.org. section 11.5.2















































