Overview Version History Q & A Rating & Review
go-templates-snippets
This extension contains code snippets for Golang templates for [Visual Studio Code][code] editor. Supports .gotmpl
, .html
and their file associations.
Supported file extensions
.gotmpl
.html
file associations of .gotmpl
and .html
Snippets
Below is a list of all available snippets.
Trigger
Content
tblock
{{ block "name" pipeline }}
tblockend
{{ block "name" pipeline }} ... {{ end }}
tbreak
{{ break }}
tcontinue
{{ continue }}
tdefine
{{ define "name" }}
tdefineend
{{ define "name" }} ... {{ end }}
telse
{{ else }}
telseif
{{ else if (condition) }}
tend
{{ end }}
tif
{{ if (condition) }}
tifend
{{ if (condition) }} ... {{ end }}
tifelseend
{{ if (condition) }} ... {{ else }} ... {{ end }}
tpartial
{{ partial "name" }}
tpipeline
{{ pipeline }}
trange
{{ range pipeline }}
trangeend
{{ range pipeline }} ... {{ end }}
ttemplate
{{ template "name" pipeline }}
twith
{{ with pipeline }}
twithend
{{ with pipeline }} ... {{ end }}
twithelseend
{{ with pipeline }} ... {{ else }} ... {{ end }}
twithelsepipeeend
{{ with pipeline }} ... {{ else with pipeline }} ... {{ end }}
Cheers!
Golang icon by Icons8