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
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
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