linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Golang template support

Open Hipska opened this issue 2 months ago • 2 comments

Language name

Go template

URL of example repository

https://github.com/golang/go/tree/master/src/text/template/testdata

URL of syntax highlighting grammar

Not found, but this is the template language doc: https://pkg.go.dev/text/template

Most popular extensions

  • .tmpl
  • .gotmpl

Detected language

Hipska avatar Oct 17 '25 08:10 Hipska

URL of example repository

https://cs.opensource.google/go/go/+/master:src/text/template/testdata/

This should be a GitHub repo… we have no control over the syntax highlighting on other sites 😉

lildude avatar Oct 17 '25 08:10 lildude

Didn't know that, I just thought you needed example files of the requested language.

My request is mainly to have syntax highlighting in markdown:

## Example template

```gotmpl
Dear {{.Name}},
{{if .Attended}}
It was a pleasure to see you at the wedding.
{{- else}}
It is a shame you couldn't make it to the wedding.
{{- end}}
{{with .Gift -}}
Thank you for the lovely {{.}}.
{{end}}
Best wishes,
Josie
```

Edit: Updated the URL.

Hipska avatar Oct 17 '25 09:10 Hipska