Commit Graph

248 Commits

Author SHA1 Message Date
chenyang929 b524e29442 Update README.md (#1620)
Missing the right colon
2018-11-01 22:44:49 +08:00
Barnabus 6f7fe487b3 Change HTML input tags to use HTML5 syntax. (#1617)
In XHTML, the <input> tag must be properly closed, like this `<input />`.  In HTML5 the `<input>` tag has no ending slash.  https://www.w3schools.com/tags/tag_input.asp
2018-11-01 16:05:40 +08:00
forging2012 8e9619767c FIX r.LoadHTMLGlob("/path/to/templates") (#1616)
FIX r.LoadHTMLGlob("/path/to/templates")) to r.LoadHTMLGlob("/path/to/templates")
2018-10-31 20:19:58 +08:00
田欧 a1a32562de
add gin user - photoprism (#1601) 2018-10-19 11:06:23 +08:00
A. F 333bac5f94 add example to set and get cookies (#1599) 2018-10-17 15:40:57 +08:00
zesani fbdcbd2275 Update README.md (#1583)
change "hava" to "have"
2018-10-09 07:14:21 +08:00
田欧 5a75dc7127
add release badge for readme (#1533) 2018-09-22 11:37:28 +08:00
Jérôme Laforge 90c680ef5c Let's user define how he wants to log his routes (eg. JSON, key value, or something else) (#1553) (#1555) 2018-09-17 12:09:34 +08:00
田欧 d510595aa5 chore: add some annotations (#1544)
ref: #1075 
because I am not a native English, maybe have a bit problem.
2018-09-15 10:23:32 +08:00
Javier Provecho Fernandez 500ebd9ea8
docs: add fnproject to gin's user list (#1505) 2018-08-31 22:38:16 +02:00
llgoer 708b76adf0 Update README.md (#1509)
change  `ShouldBindXML` to `ShouldBindJSON`
2018-08-30 14:29:26 +08:00
anoty 0da5b0c85a format readme code import (#1503) 2018-08-21 13:29:25 +08:00
Filip Figiel c6110f970c Add PureJSON renderer (#694)
Closes #693
2018-08-20 15:15:31 +08:00
aljun efdd3c8b81 Add support for Protobuf format response and unit test (#1479)
`Gin` now have the `protobufBinding` function to check the request format, but didn't have a protobuf response function like `c.YAML()`.
In our company [ByteDance](http://bytedance.com/), the largest internet company using golang in China, we use `gin` to transfer __Protobuf__  instead of __Json__, we have to write some internal library to make some wrappers to achieve that, and the code is not elegant. So we really want such a feature.
2018-08-19 10:45:56 +08:00
chainhelen f856aa85cd Update readme about the version of gin (#1494) 2018-08-17 14:59:55 +08:00
David Zhang f5451bd645 Fix typo in README [ci skip] (#1492) 2018-08-17 11:33:23 +08:00
Eason Lin a643d20605 readme: fix users link (#1493) 2018-08-17 11:21:14 +08:00
syssam 40ab9de4b5 Add BindXML AND ShouldBindXML #1484 (#1485)
Add BindXML AND ShouldBindXML #1484
2018-08-17 09:12:15 +08:00
Abner Chen 64a4548642 Fix typo in readme (#1490) 2018-08-15 13:42:12 +08:00
Alex 8aef947f6e docs: remove double negative in README.md (#1480)
"not match neither" means that it will match.
2018-08-12 22:54:22 +02:00
田欧 6159213462 unify test data (#1417)
mkdir a test data dir.
2018-08-12 23:38:31 +08:00
田欧 9666ba6738 chore: update top bar header (#1461) 2018-08-07 13:49:31 +08:00
田欧 647535cd9b Support map as query string or post form parameters (#1383)
* support query map

* add GetQueryMap and unittest

* support post-form map

* add readme for query map

* attempt to fix bug for post-form map when go version is 1.6

* remove duplicate code

* remove comment
2018-08-06 12:07:11 +08:00
Rex Lee(李俊) 85221af84c add json ASCII string render (#1358)
add a json render that rendering json as ASCII string
2018-07-03 17:17:08 +08:00
田欧 c00f21ff23 add go version prerequisite and debug warning (#1394)
* add go version prerequisite and debug warning

* merge duplicate content

* remove duplicate content
2018-06-26 18:56:43 +08:00
htobenothing bf85b32c1d Add Pusher() function for support http2 server push (#1273)
gin already support http2, while previously not support server push.
Add Pusher() function to extend the ResponseWriter interface.

```golang
// get http.Pusher
 if pusher := c.Writer.Pusher(); pusher != nil {
     // use pusher.Push() to do server push
}
```
<img width="881" alt="screen shot 2018-03-07 at 11 20 49 pm" src="https://user-images.githubusercontent.com/16014993/37100619-680c00c6-225e-11e8-9352-76ec3bd62894.png">
2018-06-21 09:53:52 +08:00
田欧 caf3e350a5 doc: update readme for adding binding about skip validate (#1359)
* update readme for adding binding about skip validate

* update readme for adding binding about skip validate
2018-05-31 14:13:40 +08:00
chainhelen 07cbe116a0 Add and fix the explanation of `HandleContext` (#1371)
Reference this issue #1323 

1. There isn't any eg about `HandleContext`  
2. The `c.Request.Path`  of `HandleContext` Comment  is not right   

Based on the above two points, I pull this request.  
If you think it's unnecessary, I will close this.  
Thx.
2018-05-30 09:19:04 +08:00
Jean-Christophe Lebreton bf7803815b Serve easily dynamic files with `DataFromReader` context method (#1304)
* Add DataFromReader context method

* Replace fmt by strconv.FormatInt

* Add pull request link to README
2018-05-12 11:00:42 +08:00
JINNOUCHI Yasushi 995fa8e9ce Fix #216: Enable to call binding multiple times in some formats (#1341)
* Add interface to read body bytes in binding

* Add BindingBody implementation for some binding

* Fix to use `BindBodyBytesKey` for key

* Revert "Fix to use `BindBodyBytesKey` for key"

This reverts commit 2c82901cea.

* Use private-like key for body bytes

* Add tests for BindingBody & ShouldBindBodyWith

* Add note for README

* Remove redundant space between sentences
2018-05-11 10:33:33 +08:00
田欧 bd4f73af67 support struct pointer (#1342)
* support struct pointer

* add readme
2018-05-01 14:24:18 +08:00
senhtry 8c24018290 Add Jsonp Support to Context (#1333) 2018-04-26 11:52:19 +08:00
JINNOUCHI Yasushi 814ac9490a Add example to build single binary with templates (#1328) 2018-04-22 15:04:38 +08:00
田欧 248c522e4a Add Contents for README because it too long (#1325) 2018-04-20 09:54:00 +08:00
Suhas Karanth 6d913fc343 fix(binding): Expose validator engine used by the default Validator (#1277)
* fix(binding): Expose validator engine used by the default Validator

- Add func ValidatorEngine for returning the underlying validator engine used
  in the default StructValidator implementation.
- Remove the function RegisterValidation from the StructValidator interface
  which made it immpossible to use a StructValidator implementation without the
  validator.v8 library.
- Update and rename test for registering validation
  Test{RegisterValidation => ValidatorEngine}.
- Update readme and example for registering custom validation.
- Add example for registering struct level validation.
- Add documentation for the following binding funcs/types:
  - Binding interface
  - StructValidator interface
  - Validator instance
  - Binding implementations
  - Default func

* fix(binding): Move validator engine getter inside interface

* docs: rm date cmd from custom validation demo
2018-03-29 14:33:07 +08:00
Romain Beuque 3e3f9bca81 doc(graceful-shutdown): failure to ListenAndServe should be a reason to exit (#1287)
Signed-off-by: Romain Beuque <romain.beuque@gmail.com>
2018-03-20 14:05:24 +08:00
README Bot cbb1ee80b1 Add CodeTriage badge to gin-gonic/gin (#1249)
Adds a badge showing the number of people helping this repo on CodeTriage.

[![Open Source Helpers](https://www.codetriage.com/gin-gonic/gin/badges/users.svg)](https://www.codetriage.com/gin-gonic/gin)

## What is CodeTriage?

CodeTriage is an Open Source app that is designed to make contributing to Open Source projects easier. It works by sending subscribers a few open issues in their inbox. If subscribers get busy, there is an algorithm that backs off issue load so they do not get overwhelmed

[Read more about the CodeTriage project](https://www.codetriage.com/what).

## Why am I getting this PR?

Your project was picked by the human, @schneems. They selected it from the projects submitted to https://www.codetriage.com and hand edited the PR. How did your project get added to [CodeTriage](https://www.codetriage.com/what)? Roughly 6 months ago, [dinsaw](https://github.com/dinsaw) added this project to CodeTriage in order to start contributing. Since then, 5 people have subscribed to help this repo.

## What does adding a badge accomplish?

Adding a badge invites people to help contribute to your project. It also lets developers know that others are invested in the longterm success and maintainability of the project.

You can see an example of a CodeTriage badge on these popular OSS READMEs:

- [![](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [![](https://www.codetriage.com/crystal-lang/crystal/badges/users.svg)](https://www.codetriage.com/crystal-lang/crystal) https://github.com/crystal-lang/crystal

## Have a question or comment?

While I am a bot, this PR was manually reviewed and monitored by a human - @schneems. My job is writing commit messages and handling PR logistics.

If you have any questions, you can reply back to this PR and they will be answered by @schneems. If you do not want a badge right now, no worries, close the PR, you will not hear from me again.

Thanks for making your project Open Source! Any feedback is greatly appreciated.
2018-02-22 21:28:50 +08:00
MW Lim 7a9a290b36 minor typo in README.md (#1219) 2018-01-23 10:36:36 +08:00
Kevin Zhu 8a6792d516 Fix README.md example code (#1231)
r -> router
2018-01-23 10:07:33 +08:00
Levi Olson 05547037e4 Minor grammatical correction in README (#1206) 2017-12-21 10:48:11 +08:00
TaeJun Park 25e7cd75ed Update README.md (#1188)
change path from '~/go/...' to '$GOPATH/...'
2017-12-17 08:05:30 +08:00
Max Hilbrunner 13a40fcd2c README: Small update to clarify on Goroutines (#1199) 2017-12-17 00:52:07 +08:00
Boris Borshevsky 6f94fd05c9 Linting and optimizing struct memory signature. (#1184)
* fix cleanPath spell (#969)

* linter and optimize structs
2017-11-29 10:50:14 +08:00
Richard Lee ae9f03e6e8 Fix up syntax error in README (#1155) 2017-11-11 23:56:59 -06:00
Andrii Bubis 80f691159f Added simple testing documentation and examples (#1156) 2017-11-11 23:37:32 -06:00
田欧 9ae1e5db2a add package for govendor (#1166)
* add package for govendor

* fix vet error.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* add missing example.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update gin-gonic/autotls

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-11-11 23:11:22 -06:00
田欧 6653d5d588 fix markdown render (#1149) 2017-10-29 21:38:38 -05:00
Suhas Karanth dfb68ce085 feat(context): ShouldBind counterparts for Bind methods (#1047)
* feat(context): ShouldBind counterparts for Bind methods + tests

* docs(readme): Switch examples to use ShouldBind methods

Add section for bind methods types, explain difference in behavior.
Switch all `c.Bind` examples to use `c.ShouldBind`.
2017-10-23 11:14:09 +02:00
Bo-Yi Wu b8b68314fa feat: add multiple service example. (#1119) 2017-09-29 16:48:10 +08:00
Kristoffer A. Iversen 8c17c680d9 Fixed README.md typo (#1104)
* Fixed README.md typo

* Fixed example typo

* Fixed example typo
2017-09-11 22:17:26 +08:00