<commit_before>#Gin Web Framework [![GoDoc](https://godoc.org/github.com/gin-gonic/gin?status.svg)](https://godoc.org/github.com/gin-gonic/gin) [![Build Status](https://travis-ci.org/gin-gonic/gin.svg)](https://travis-ci.org/gin-gonic/gin)

Gin is a web framework written in Golang. It features a martini-like API with much better performance, up to 40 times faster thanks to [httprouter](https://github.com/julienschmidt/httprouter). If you need performance and good productivity, you will love Gin. 

![Gin console logger](https://gin-gonic.github.io/gin/other/console.png)

```
$ cat test.go
```
```go
package main

import "github.com/gin-gonic/gin"

func main() {
	router := gin.Default()
	router.GET("/", func(c *gin.Context) {
		c.String(200, "hello world")
	})
	router.GET("/ping", func(c *gin.Context) {
		c.String(200, "pong")
	})
	router.POST("/submit", func(c *gin.Context) {
		c.String(401, "not authorized")
	})
	router.PUT("/error", func(c *gin.Context) {
		c.String(500, "and error hapenned :(")
	})
	router.Run(":8080")
}
```

##Gin is new, will it be supported?

Yes, Gin is an internal tool of [Manu](https://github.com/manucorporat) and [Javi](https://github.com/javierprovecho) for many of our projects/start-ups. We developed it and we are going to continue using and improve it.


##Roadmap for v1.0
- [ ] Ask our designer for a cool logo
- [ ] Add tons of unit tests
- [ ] Add internal benchmarks suite
- [ ] More powerful validation API
- [ ] Improve documentation
- [ ] Add Swagger support
- [x] Stable API
- [x] Improve logging system
- [x] Improve JSON/XML validation using bindings
- [x] Improve XML support
- [x] Flexible rendering system
- [x] Add more cool middlewares, for example redis caching (this also helps developers to understand the framework).
- [x] Continuous integration
- [x] Performance improments, reduce allocation and garbage collection overhead
- [x] Fix bugs



## Start using it
Obviously, you need to have Git and Go already installed to run Gin.  
Run this in your terminal

```
go get github.com/gin-gonic/gin
```
Then import it in your Go code:

```
import "github.com/gin-gonic/gin"
```


##Community
If you'd like to help out with the project, there's a mailing list and IRC channel where Gin discussions normally happen.

* IRC
 * [irc.freenode.net #getgin](irc://irc.freenode.net:6667/getgin)
 * [Webchat](http://webchat.freenode.net?randomnick=1&channels=%23getgin)
* Mailing List
 * Subscribe: [<EMAIL>](mailto:<EMAIL>)
 * [Archives](http://librelist.com/browser/getgin/)


##API Examples

#### Create most basic PING/PONG HTTP endpoint
```go 
package main

import "github.com/gin-gonic/gin"

func main() {
	r := gin.Default()
	r.GET("/ping", func(c *gin.Context) {
		c.String(200, "pong")
	})

	// Listen and server on 0.0.0.0:8080
	r.Run(":8080")<commit_msg>Fixes a minor typo, changes 'Listen and server on 0.0.0.0:8080' to 'Listen and serve on 0.0.0.0:8080'<commit_after>#Gin Web Framework [![GoDoc](https://godoc.org/github.com/gin-gonic/gin?status.svg)](https://godoc.org/github.com/gin-gonic/gin) [![Build Status](https://travis-ci.org/gin-gonic/gin.svg)](https://travis-ci.org/gin-gonic/gin)

Gin is a web framework written in Golang. It features a martini-like API with much better performance, up to 40 times faster thanks to [httprouter](https://github.com/julienschmidt/httprouter). If you need performance and good productivity, you will love Gin. 

![Gin console logger](https://gin-gonic.github.io/gin/other/console.png)

```
$ cat test.go
```
```go
package main

import "github.com/gin-gonic/gin"

func main() {
	router := gin.Default()
	router.GET("/", func(c *gin.Context) {
		c.String(200, "hello world")
	})
	router.GET("/ping", func(c *gin.Context) {
		c.String(200, "pong")
	})
	router.POST("/submit", func(c *gin.Context) {
		c.String(401, "not authorized")
	})
	router.PUT("/error", func(c *gin.Context) {
		c.String(500, "and error hapenned :(")
	})
	router.Run(":8080")
}
```

##Gin is new, will it be supported?

Yes, Gin is an internal tool of [Manu](https://github.com/manucorporat) and [Javi](https://github.com/javierprovecho) for many of our projects/start-ups. We developed it and we are going to continue using and improve it.


##Roadmap for v1.0
- [ ] Ask our designer for a cool logo
- [ ] Add tons of unit tests
- [ ] Add internal benchmarks suite
- [ ] More powerful validation API
- [ ] Improve documentation
- [ ] Add Swagger support
- [x] Stable API
- [x] Improve logging system
- [x] Improve JSON/XML validation using bindings
- [x] Improve XML support
- [x] Flexible rendering system
- [x] Add more cool middlewares, for example redis caching (this also helps developers to understand the framework).
- [x] Continuous integration
- [x] Performance improments, reduce allocation and garbage collection overhead
- [x] Fix bugs



## Start using it
Obviously, you need to have Git and Go already installed to run Gin.  
Run this in your terminal

```
go get github.com/gin-gonic/gin
```
Then import it in your Go code:

```
import "github.com/gin-gonic/gin"
```


##Community
If you'd like to help out with the project, there's a mailing list and IRC channel where Gin discussions normally happen.

* IRC
 * [irc.freenode.net #getgin](irc://irc.freenode.net:6667/getgin)
 * [Webchat](http://webchat.freenode.net?randomnick=1&channels=%23getgin)
* Mailing List
 * Subscribe: [<EMAIL>](mailto:<EMAIL>)
 * [Archives](http://librelist.com/browser/getgin/)


##API Examples

#### Create most basic PING/PONG HTTP endpoint
```go 
package main

import "github.com/gin-gonic/gin"

func main() {
	r := gin.Default()
	r.GET("/ping", func(c *gin.Context) {
		c.String(200, "pong")
	})

	// Listen and serve on 0.0.0.0:8080
	r.Run(":8080")
{'fraction_non_alphanumeric': 0.1513353115727003, 'fraction_numerical': 0.017455053237912375, 'mean_word_length': 4.106951871657754, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5054405', 'n_tokens_mistral': 2083, 'n_tokens_neox': 1932, 'n_words': 592}