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

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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