Render is a package that provides functionality for easily rendering JSON, XML, text, binary data, and HTML templates. Render can be used with pretty much any web framework provided you can access the HTTP.ResponseWriter from your handler. The rendering functions simply wraps Go's existing functionality for marshaling and rendering data. HTML: Uses the html/template package to render HTML templates. JSON: Uses the encoding/json package to marshal data into a JSON-encoded response. XML: Uses the encoding/xml package to marshal data into an XML-encoded response. Binary data: Passes the incoming data straight through to the HTTP.ResponseWriter. Text: Passes the incoming string straight through to the http.ResponseWriter. Render comes with a variety of configuration options. By default Render will attempt to load templates with a '.tmpl' extension from the "templates" directory.

Features

  • JSON vs Streaming JSON
  • You can also load templates from memory by providing the Asset and AssetNames options
  • Render provides yield and partial functions for layouts to access
  • current can also be called to get the current template being rendered
  • Partials are defined by individual templates
  • Character Encodings

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Render

Render Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Render!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks, Go Web Development Frameworks

Registered

2023-01-27