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 2d628379e7 Remove debug log 2016-03-12 13:44:55 -05:00
fixtures Add AppendDirectories option to render 2016-03-12 13:37:30 -05:00
.gitignore !!!m.Group API Broken!!! 2014-10-24 18:42:57 -04:00
.travis.yml Add go1.6 and tip to CI 2016-03-12 13:39:19 -05:00
context_test.go new license and API 2015-10-13 01:53:48 -04:00
context.go Use dummy render to panic with more friendly message 2016-02-01 20:01:43 -05: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 new license and API 2015-10-13 01:53:48 -04:00
macaron_test.go new license and API 2015-10-13 01:53:48 -04:00
macaron.go Remove debug log 2016-03-12 13:44:55 -05:00
macaronlogo.png Logo 2014-10-13 05:01:04 -04:00
README.md Bump version to 1.0 2016-02-02 08:48:52 -05: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 Add AppendDirectories option to render 2016-03-12 13:37:30 -05:00
render.go Remove debug log 2016-03-12 13:44:55 -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
static_test.go new license and API 2015-10-13 01:53:48 -04:00
static.go new license and API 2015-10-13 01:53:48 -04:00

Macaron Build Status

Macaron Logo

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

Current version: 1.0.0

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.