Unknwon f3a228ed61 vendor: update gopkg.in/macaron.v1 7 years ago
..
LICENSE 2fd69f13d9 vendor: check in vendors 7 years ago
README.md f3a228ed61 vendor: update gopkg.in/macaron.v1 7 years ago
context.go bd786b8ef0 auth: remove MD5 for secure cookie secret (#4117) 7 years ago
logger.go f3a228ed61 vendor: update gopkg.in/macaron.v1 7 years ago
macaron.go f3a228ed61 vendor: update gopkg.in/macaron.v1 7 years ago
macaronlogo.png 2fd69f13d9 vendor: check in vendors 7 years ago
recovery.go 2fd69f13d9 vendor: check in vendors 7 years ago
render.go 2fd69f13d9 vendor: check in vendors 7 years ago
response_writer.go 2fd69f13d9 vendor: check in vendors 7 years ago
return_handler.go 2fd69f13d9 vendor: check in vendors 7 years ago
router.go 2fd69f13d9 vendor: check in vendors 7 years ago
static.go 2fd69f13d9 vendor: check in vendors 7 years ago
tree.go 2fd69f13d9 vendor: check in vendors 7 years ago

README.md

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

  • Gogs: A painless self-hosted Git Service
  • Grafana: The tool for beautiful monitoring and metric analytics & dashboards
  • Peach: A modern web documentation server
  • Go Walker: Go online API documentation
  • Switch: Gopm registry
  • YouGam: Online Forum
  • Critical Stack Intel: A 100% free intel marketplace from Critical Stack, Inc.

Getting Help

Credits

License

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

PANIC: session(release): write data/sessions/3/5/35f98fd384a3d1c3: no space left on device

PANIC

session(release): write data/sessions/3/5/35f98fd384a3d1c3: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)