Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

leonco/gote

Repository files navigation

gote

gote is a simple but powerful text templating library for go. The syntax is similar to Google's ctemplate library, and emphasizes the separation of logic from presentation.

Example

t, err := gote.Parse([]byte("Hello {{WORLD:h}}"))
if err != nil {
	panic(err)
}
dict := gote.NewTemplateDictionary()
dict.Put("WORLD", "<h1>world</h1>")
t.Render(dict, os.Stdout)

Features

  • Enforces a strict separation of "view" from application logic.
  • Based loosely on the syntax and behavior of Google's ctemplate library.
  • Templates do not require a compilation step. Templates are parsed at runtime.
  • Native support for some types of content escaping (JavaScript, XML, HTML, URLs).

About

ctemplate for go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /