I have a golang file which contains all global variables, such as static file path, version id etc. I need to use it in templates but without passing a context when rendering template. Here is a demonstrate:
settings.go
const STATIC_FILE="/static/"
const VERSION = 1
example.html
<script src="{{.STATIC_FILE}}assets/plugins/angular/angular-checklist.js?v={{.VERSION}}" type="text/javascript"></script>
Note: I am looking a different way, not passing a context to template execute method.