This belongs in the template FuncMap:

```go
template.New("arg").Funcs(template.FuncMap{"getenv": os.Getenv}).Parse(arg)
```