田欧
0feaf8cbd8
Split examples to alone repo ( #1776 )
...
* split examples to alone repo
* vendor
* fix package error
* add examples/README.md
2019-03-01 23:42:41 +08:00
ffhelicopter
90587c7787
Update: examples/graceful-shutdown/server.go ( #1530 )
...
* Update server.go
It's necessary that catching ctx.Done()
* Update server.go
* Update server.go
* Update README.md
* Update README.md
2019-02-20 13:24:29 +08:00
Jeremy Loy
fece76d93f
Add NewRelic middleware example. ( #1526 )
...
* Add NewRelic middleware example.
* Update go.mod
* Update main.go
2019-02-20 10:41:46 +08:00
awkj
5846ceba8b
add notify accept signal ( #1740 )
...
* add notify accept signal
* add import
* update readme,keep same with example
2019-02-20 00:02:37 +08:00
Ganlv
1542eff27f
Fix #1693 : file.Filename should not be trusted ( #1699 )
2018-12-17 08:13:07 +08:00
Barnabus
7a374f9a47
Fix typos ( #1626 )
2018-11-05 14:17:04 +08:00
Barnabus
4f488aca55
Change the doctype
to be lowercase to be consistent with the rest of the code base. ( #1624 )
2018-11-05 09:44:00 +08:00
Barnabus
af23ac2256
Remove type attribute from HTML script tag to be consistent with the rest of the codebase. ( #1623 )
...
The `<script>` tag is used to define a client-side script (JavaScript). The "type" attribute is required in HTML 4, but optional in HTML5.
2018-11-05 09:35:24 +08:00
Barnabus
f83cdb357e
Fix typos ( #1625 )
2018-11-05 09:13:17 +08:00
Barnabus
6be9b5437b
Change HTML link tags to use HTML5 syntax. ( #1621 )
...
The `<link>` element is an empty element, it contains attributes only. In HTML5 the `<link>` tag has no end tag. In XHTML the `<link>` tag must be properly closed.
2018-11-01 21:48:26 +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
田欧
6db092f778
chore: add some annotations ( #1550 )
...
ref #1075 should all annotations and can close #1075 .
2018-09-15 15:21:54 +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
田欧
f45c928a15
chore: use http.Status* instead of hard code ( #1482 )
2018-08-14 09:51:56 +08:00
田欧
6159213462
unify test data ( #1417 )
...
mkdir a test data dir.
2018-08-12 23:38:31 +08:00
田欧
605aa1c30f
example: fix typo for grpc ( #1405 )
...
sorry...fixed #1403
2018-06-22 23:44:45 +08:00
田欧
737d2fb7ab
add grpc example ( #1401 )
...
use grpc helloworld example.
2018-06-22 09:51:06 +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
JINNOUCHI Yasushi
814ac9490a
Add example to build single binary with templates ( #1328 )
2018-04-22 15:04:38 +08:00
esplo
3455d7f388
change README for app-engine example because of goapp deprecation ( #1324 )
...
the App Engine SDK is superseded by the Cloud SDK
2018-04-19 12:00:22 +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
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
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
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
Daniel M. Lambea
c9b344118f
Moved const 'defaultMemory' to attrib. Engine.MaxMultipartMemory instead. ( #1100 )
2017-09-07 11:45:16 +08:00
Suhas Karanth
26c3f42095
feat(binding): add support for custom validator / validation tags ( #1068 )
...
* feat(binding): Add support for custom validation tags
* docs: Add example for custom validation tag
* test(binding): Add test for registering custom validation
2017-08-27 09:37:39 +02:00
keke
ecae34c4e1
fix 200 to http.Status ( #1067 )
2017-08-16 09:50:43 +08:00
田欧
d39ed41ab3
update template example ( #1038 )
...
* update template example
* add template example folder
2017-07-20 21:29:23 -05:00
Eason Lin
93b3a0d7ec
feat(context): add SaveUploadedFile func. ( #1022 )
...
* feat(context): add SaveUploadedFile func.
* feat(context): update multiple upload examples.
* style(example): fix gofmt
* fix(example): add missing return
2017-07-15 22:42:08 -05:00
田欧
bbd4dfee50
add warning using http2 example ( #1009 )
2017-07-12 02:01:46 -05:00
田欧
87fdff8f88
[docs] add http2 example ( #1000 )
2017-07-10 20:03:09 -05:00
田欧
44da058aa0
add favicon example ( #1001 )
2017-07-10 09:21:42 -05:00
Bo-Yi Wu
baf216e167
add error check. ( #972 )
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-04 03:12:29 -05:00
Bo-Yi Wu
f0b54a3023
fix: update autotls example. ( #965 )
2017-07-03 00:55:21 -05:00
田欧
0681715dda
add Makefile for example ( #951 )
2017-06-15 20:07:42 -05:00
田欧
1a627c2449
fmt code style ( #950 )
2017-06-14 21:14:25 -05:00
田欧
d922143bc5
lint code for import ( #939 )
2017-06-11 21:40:15 -05:00
Bo-Yi Wu
f8520b83f9
update
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-04-17 13:41:47 +08:00
Bo-Yi Wu
0cb7cf88cb
docs: add comment.
2017-04-04 14:19:04 +08:00
Bo-Yi Wu
6b0ae2a64a
docs: update example.
2017-04-03 23:34:00 +08:00
Bo-Yi Wu
d17e0a31b8
fix: remove hard code for cache.
2017-04-03 23:30:46 +08:00
Bo-Yi Wu
46220b726d
feat: support Let's Encrypt tls.
2017-04-03 21:23:45 +08:00
Bo-Yi Wu
b8be9df642
docs: add graceful-shutdown example for go 1.8 ( #835 )
...
* docs: add graceful-shutdown example for go 1.8
* fix testing
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-03-16 10:38:30 -05:00
Bo-Yi Wu
17af53a565
add upload file example.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-01-03 11:50:35 +08:00
Bo-Yi Wu
d158ef2e82
Support disable console color.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-21 14:41:47 +08:00
Javier Provecho Fernandez
9e930b9bdd
lint code
2016-04-15 01:16:46 +02:00
Bo-Yi Wu
00ff808ac5
fix: example format.
2016-02-17 10:45:44 +08:00