MCPcopy Index your code
hub / github.com/CloudyKit/jet

github.com/CloudyKit/jet @v6.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v6.3.2 ↗ · + Follow
536 symbols 1,674 edges 33 files 201 documented · 38% 7 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Jet Template Engine for Go

Build Status Build status Join the chat at https://gitter.im/CloudyKit/jet

Jet is a template engine developed to be easy to use, powerful, dynamic, yet secure and very fast.

  • simple and familiar syntax
  • supports template inheritance (extends) and composition (block/yield, import, include)
  • descriptive error messages with filename and line number
  • auto-escaping
  • simple C-like expressions
  • very fast execution – Jet can execute templates faster than some pre-compiled template engines
  • very light in terms of allocations and memory footprint

v6

Version 6 brings major improvements to the Go API. Make sure to read through the breaking changes before making the jump.

Docs

Example application

An example to-do application is available in examples/todos. Clone the repository, then (in the repository root) do:

  $ cd examples/todos; go run main.go

IntelliJ Plugin

If you use IntelliJ there is a plugin available at https://github.com/jhsx/GoJetPlugin. There is also a very good Go plugin for IntelliJ – see https://github.com/go-lang-plugin-org/go-lang-idea-plugin. GoJetPlugin + Go-lang-idea-plugin = happiness!

Contributing

All contributions are welcome – if you find a bug please report it.

Contributors

  • José Santos (@jhsx)
  • Daniel Lohse (@annismckenzie)
  • Alexander Willing (@sauerbraten)

Extension points exported contracts — how you extend this code

Ranger (Interface)
Ranger describes an interface for types that iterate over something. Implementing this interface means the ranger will b [8 …
ranger.go
Loader (Interface)
Loader is a minimal interface required for loading templates. Jet will build an absolute path (with slash delimiters) b [5 …
loader.go
Renderer (Interface)
Renderer is used to detect if a value has its own rendering logic. If the value an action evaluates to implements this i [2 …
eval.go
Cache (Interface)
Cache is the interface Jet uses to store and retrieve parsed templates. [1 implementers]
cache.go
Visitor (Interface)
Visitor type implementing the visitor pattern [1 implementers]
utils/visitor.go
Option (FuncType)
Option is the type of option functions that can be used in NewSet().
set.go
Node (Interface)
Changed to "%q" in tests for better error messages.
node.go
Func (FuncType)
Func function implementing this type is called directly, which is faster than calling through reflect. If a function is
func.go

Core symbols most depended-on inside this repo

Type
called by 77
node.go
Set
called by 55
exec.go
String
called by 53
node.go
errorf
called by 45
node.go
emit
called by 44
lex.go
visitNode
called by 41
utils/visitor.go
evalPrimaryExpressionGroup
called by 36
eval.go
Execute
called by 31
exec.go

Shape

Method 298
Function 146
Struct 73
Interface 8
FuncType 6
TypeAlias 5

Languages

Go100%

Modules by API surface

node.go92 symbols
eval_test.go67 symbols
eval.go66 symbols
parse.go53 symbols
lex.go39 symbols
constructors.go35 symbols
utils/visitor.go30 symbols
ranger.go22 symbols
set.go20 symbols
parse_test.go15 symbols
loader.go14 symbols
func.go9 symbols

For agents

$ claude mcp add jet \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact