Skip to content

evertdespiegeleer/go-template-js

Repository files navigation

@evertdespiegeleer/go-template

A (wasm based) Node wrapper for the Go template engine

While the inner workings are totally different, the library is heavilly inspired by @ctrl/golang-template.

Installation

npm i @evertdespiegeleer/go-template

Usage examples:

import { parse } from '@evertdespiegeleer/go-template';

await parse('Hello {{ .name }}', { name: 'World' });
// Hello World
import { parse } from '@evertdespiegeleer/go-template';

await parse('{{ range . }}Hi {{ .name }}!\n{{ end }}', [
    { name: 'Evert' },
    { name: 'John' },
]);
// Hi Evert!
// Hi John!

Development

Init the repo

./scripts/dev-init.sh

About

A Node wrapper for the Go template engine

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •