Skip to content

Ego templating library #29

Answered by benbjohnson
yemzz asked this question in Q&A
Feb 5, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

hey again! Great question. There are lots of templating implementations and Go even includes one in its standard library (html/template). There are several things I dislike about most templating libraries (including Go's):

  1. They are evaluated at runtime so you don't get the benefit of type checking.
  2. They have to be embedded into your application. This is easier with Go 1.16 since it includes file embedding.
  3. It's a whole new language to learn on top of Go.

The ego templating library is modeled after the ERb template library from Ruby and it's a really thin layer over the Go language. It transpiles .ego files to .go files at compile time so that you end up with templates that are pure Go. …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yemzz
Comment options

@benbjohnson
Comment options

Answer selected by yemzz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants