This repository has been archived on 2020-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Unknwon aa6b7ee41a Bump version 2017-01-22 09:42:53 -05:00
fixtures Add AppendDirectories option to render 2016-03-12 13:37:30 -05:00
.gitignore Expose some objects 2016-07-16 00:38:19 +08:00
.travis.yml Remove stupid 1.4 for CI 2016-03-12 20:59:28 -05:00
context_test.go Add Context.QueryBool helper 2016-08-05 17:52:39 -07:00
context.go Add Context.QueryBool helper 2016-08-05 17:52:39 -07:00
LICENSE Initial commit 2014-07-09 23:16:39 -04:00
logger_test.go new license and API 2015-10-13 01:53:48 -04:00
logger.go Print date and time in log for requests. 2016-03-17 15:35:17 -03:00
macaron_test.go new license and API 2015-10-13 01:53:48 -04:00
macaron.go Bump version 2017-01-22 09:42:53 -05:00
macaronlogo.png Logo 2014-10-13 05:01:04 -04:00
README.md Add Context.QueryBool helper 2016-08-05 17:52:39 -07:00
recovery_test.go new license and API 2015-10-13 01:53:48 -04:00
recovery.go new license and API 2015-10-13 01:53:48 -04:00
render_test.go Fix test cases 2016-07-16 00:45:12 +08:00
render.go Make TemplateFileSystem implements Pongo2 TemplateLoader 2016-12-22 02:58:01 -05:00
response_writer_test.go new license and API 2015-10-13 01:53:48 -04:00
response_writer.go Initial commit 2014-07-09 23:16:39 -04:00
return_handler_test.go new license and API 2015-10-13 01:53:48 -04:00
return_handler.go new license and API 2015-10-13 01:53:48 -04:00
router_test.go new license and API 2015-10-13 01:53:48 -04:00
router.go Fix possible race condition 2016-12-22 05:49:42 -05:00
static_test.go Add ETag header to staticHandler (#114) 2017-01-22 09:37:29 -05:00
static.go Add ETag header to staticHandler (#114) 2017-01-22 09:37:29 -05:00
tree_test.go Adjust tree test cases 2016-09-15 21:06:38 -04:00
tree.go Fix #101 2016-08-26 11:07:28 -07:00

Macaron Build Status

Macaron Logo

Package macaron is a high productive and modular web framework in Go.

Getting Started

The minimum requirement of Go is 1.3.

To install Macaron:

go get gopkg.in/macaron.v1

The very basic usage of Macaron:

package main

import "gopkg.in/macaron.v1"

func main() {
	m := macaron.Classic()
	m.Get("/", func() string {
		return "Hello world!"
	})
	m.Run()
}

Features

  • Powerful routing with suburl.
  • Flexible routes combinations.
  • Unlimited nested group routers.
  • Directly integrate with existing services.
  • Dynamically change template files at runtime.
  • Allow to use in-memory template and static files.
  • Easy to plugin/unplugin features with modular design.
  • Handy dependency injection powered by inject.
  • Better router layer and less reflection make faster speed.

Middlewares

Middlewares allow you easily plugin/unplugin features for your Macaron applications.

There are already many middlewares to simplify your work:

  • render - Go template engine
  • static - Serves static files
  • gzip - Gzip compression to all responses
  • binding - Request data binding and validation
  • i18n - Internationalization and Localization
  • cache - Cache manager
  • session - Session manager
  • csrf - Generates and validates csrf tokens
  • captcha - Captcha service
  • pongo2 - Pongo2 template engine support
  • sockets - WebSockets channels binding
  • bindata - Embed binary data as static and template files
  • toolbox - Health check, pprof, profile and statistic services
  • oauth2 - OAuth 2.0 backend
  • switcher - Multiple-site support
  • method - HTTP method override
  • permissions2 - Cookies, users and permissions
  • renders - Beego-like render engine(Macaron has built-in template engine, this is another option)

Use Cases

Getting Help

Credits

License

This project is under the Apache License, Version 2.0. See the LICENSE file for the full license text.