Commit Graph

331 Commits

Author SHA1 Message Date
minarc f068099d0d
Update README.md () 2021-11-28 09:24:14 +08:00
Notealot 2d3d6d2f13
Provide custom options of TrustedPlatform for another CDN services ()
* refine TrustedPlatform and docs

* refactor for switch

* refactor switch to if statement
2021-10-24 08:34:03 +08:00
Allen Ren 34ae7777ca
README.md: fix a typo () 2021-10-22 21:26:14 +08:00
Notealot 39181329de
Tidy: Complete TrustedProxies feature () 2021-10-06 09:37:25 +08:00
Aravinth Sundaram ef168679ce
Correcting grammatical errors in README file () 2021-09-28 08:57:36 +08:00
goqihoo b463b1c2a1
Update README.md ()
1. c.FullPath() == "/user/:name/*action"
get following error:
evaluated but not used 
2. c.String(http.StatusOK, "The available groups are [...]", name)
get following error:
undefined: name
2021-08-11 09:42:25 +08:00
voidman 690aa2b1b9
feat(binding): support custom struct tag ()
* feat(binding): support custom struct tag

Add function `binding.MapFormWithTag` ()

* doc: add 'bind form-data with custom struct tag'

Add 'Bind form-data request with custom struct and custom tag' section ()

* test(binding): add test for MapFromWithTag
2021-06-30 00:53:56 +08:00
Jeff fb8a113f8d
ci: add github action workflows ()
* ci: add github action workflows

* test: fixed the TestUnixSocket test on windows ()

* ci: add github action workflows ()

* Remove .travis.yml

* ci: replace GITTER_ROOM_ID and upload coverage every time you go test

* ci: update coverage using codecov/codecov-action@v1

* Merge branch 'master' into github-actions

* repo: replace travis ci to github actions

* ci: add go version 1.16

* fix: go install requires a specific version

* chore(ci): remove go 1.12 support

* chore(ci): remove os windows-latest

Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-06-23 13:10:49 +08:00
yugu d7091e7dec
README.md update ()
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-05-19 10:57:23 +08:00
y-yagi 5452a1d3ef
Add note about `nomsgpack` tag to the readme ()
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-05-01 14:13:50 +08:00
y-yagi 1acb459c10
Fix example code of `Bind Uri` ()
Need to pass a string to `gin.H` to show a message correctly.
2021-05-01 13:57:22 +08:00
zzjin c0418c48e4
Add support go-json, another drop-in json replacement. ()
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-04-21 08:45:49 +08:00
thinkerou ee4de846a8
Remove go1.12 support ()
* Revert "Adding ppc64le architecture support on travis-ci ()"

This reverts commit fca3f95d7c.

* not support go1.12

* fix

* Update errors_test.go

* Update debug.go
2021-04-12 00:29:34 +08:00
Manu MA bfc8ca285e
feat(engine): add trustedproxies and remoteIP ()
Co-authored-by: Søren L. Hansen <soren@linux2go.dk>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Javier Provecho Fernandez <javiertitan@gmail.com>
2021-04-06 11:37:25 +08:00
Ross Wolf f3de8132c5
Add mixed param and non-param paths (port of httprouter#329) ()
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-04-06 10:49:08 +08:00
Alexander Melentyev e899771392
chore: Deleted spaces () 2021-01-27 09:58:21 +08:00
Josep Jesus Bigorra Algaba 46ddd4259c
Fixes to the graceful shutdown example ()
* Change error comparison to use errors.Is() and add a line of whitespace before the if statement on graceful shutdown

* Change from log.Fatalf to log.Printf to ensure the graceful shutdown actually works

Co-authored-by: J. J. Bigorra <josep@prowarehouse.nl>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2021-01-13 09:06:12 +08:00
thinkerou 16cd8cdd4e
ci: romove go1.11 for gin1.7 () 2020-10-25 17:08:30 +08:00
Zasda Yusuf Mikail d541085b59
Add some missing dots on README ()
Signed-off-by: Zasda Yusuf Mikail <zasdaym@gmail.com>

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-10-16 09:32:10 +08:00
yugu 1f232c7f47
docs:close the body of the response () 2020-09-09 20:00:44 +08:00
Dennis Cho b860d8672d
Fix typo () 2020-09-02 23:15:25 +08:00
森 優太 c6d6df6d5a
Docs: Update README.md Custom Validator sample code ()
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-08-01 15:26:29 +08:00
Hiroyuki Tanaka 44e78a78d4
README: Change badge to pkg.go.dev () 2020-08-01 15:03:33 +08:00
Johnny Dallas 4cabdd303f
Add CustomRecovery builtin middleware ()
* Add CustomRecovery and CustomRecoveryWithWriter methods

* add CustomRecovery example to README

* add test for CustomRecovery

* support RecoveryWithWriter(io.Writer, ...RecoveryFunc)
2020-07-09 09:40:00 +08:00
Miles 5f261fa752
Add a redirect sample for POST method ()
* Add a redirect sample for POST method

Refer to issue https://github.com/gin-gonic/gin/issues/444

* put an empty line before 1396

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-24 11:37:32 +08:00
Anup Kumar Panwar 82b284fd77
uncomment the code () 2020-05-08 08:50:26 +08:00
bn4t 235898e642
Fix typo () 2020-05-05 23:20:00 +08:00
Bo-Yi Wu 05464a8f6b
docs: update benchmark result v1.6.3 () 2020-05-05 16:37:40 +08:00
thinkerou 747efffd2a
chore: update godoc address () 2020-05-05 14:06:42 +08:00
Shilin Wang 4f208887e1
update set cookie example ()
fix 
2020-04-08 23:31:31 +08:00
Igor H. Vieira c4fd2489ce
Improved the graceful shutdown and restart section and removed… () 2020-03-22 10:25:35 +08:00
Nikifor Seryakov 1d055af1bc
FileFromFS ()
* Context.FileFromFS added

* Context File and FileFromFS examples at README

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-07 10:23:33 +08:00
Bo-Yi Wu 863ad2d4de
docs(badge): add todo badge ()
fix https://github.com/gin-gonic/gin/issues/2236

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-21 16:33:36 +08:00
Andy Pan 07c0f05f24 Renew README to fit the modification of SetCookie method ()
fix 
2020-01-23 07:54:08 +08:00
John Bampton 59ab588bf5 Remove broken link from README. () 2019-12-30 21:55:08 +08:00
Lin Kao-Yuan 9b3477ef9d Update validator to v10 ()
Passed my manual test, output nothing different.
2019-12-20 14:01:58 +08:00
飞雪无情 cc14a770cd upgrade go-validator to v10 for README () 2019-12-19 11:21:58 +08:00
Lin Kao-Yuan 1b480ed294 Update to currently output ()
Excuse me, I forgot change output in 
2019-12-18 21:08:58 +08:00
Lin Kao-Yuan aee83e040b Fix "Custom Validators" example ()
* Update fixed error code from merged commit

According to [this](874dcfa6c4) merged commit.

* Fixed incorrect testing date.

Original testing date incompatible demo require, can't get expect result.
check_in date need NOT AFTER check_out date.
2019-12-18 09:44:33 +08:00
Victor Castell 77b8344169 Add project to README ()
Add Dkron as user of Gin in the README
2019-12-02 20:59:56 +08:00
thinkerou 3c8e29b53c
drop support govendor () 2019-11-25 15:42:23 +08:00
BradyBromley 3737520f17 Changed wording for clarity in README.md () 2019-11-25 11:03:36 +08:00
thinkerou 2ee0e96394 Drop support go1.10 () 2019-11-24 23:07:56 +08:00
Ildar1111 089016a092 Update README.md ()
* Update README.md

c:\>curl 0.0.0.0:8080
"Failed to connect to 0.0.0.0 port 8080: Address not available"
Connecting to address 0.0.0.0:8080 is not allowed on windows. From http://msdn.microsoft.com/en-us/library/aa923167.aspx

" ... If the address member of the structure specified by the name parameter is
all zeroes, connect will return the error WSAEADDRNOTAVAIL. ..."

* Update README.md

edit comment
2019-10-25 10:03:53 +08:00
John Bampton 4fd3234840 Fix spelling. () 2019-10-03 07:46:41 +08:00
bullgare 9b9f4fab34 Updated Readme.md: file.Close() for template read () 2019-09-24 22:18:41 +08:00
bullgare f45c83c70c Updated Readme.md for serving multiple services ()
Previous version had issues - if one service did not start for any reason, you would never know about it.
2019-09-23 23:48:10 +08:00
Jim Filippou b80d675864 Added specific installation instructions for Mac ()
Made it more clear for Mac users using Go version 1.8 and greater.
2019-09-05 21:50:54 +08:00
Johnny Dallas 6ece26c7c5 Add Header bind methods to README () 2019-08-30 10:58:55 +08:00
guonaihong 502c898d75 binding: support unix time ()
* binding: support unix time

ref:#1979

* binding: support unix time

add test file
modify readme

```golang
package main

import (
        "fmt"
        "github.com/gin-gonic/gin"
        "time"
)

type shareTime struct {
        CreateTime time.Time `form:"createTime" time_format:"unixNano"`
        UnixTime   time.Time `form:"unixTime" time_format:"unix"`
}

func main() {
        r := gin.Default()
        unix := r.Group("/unix")

        testCT := time.Date(2019, 7, 6, 16, 0, 33, 123, time.Local)
        fmt.Printf("%d\n", testCT.UnixNano())

        testUT := time.Date(2019, 7, 6, 16, 0, 33, 0, time.Local)
        fmt.Printf("%d\n", testUT.Unix())

        unix.GET("/nano", func(c *gin.Context) {
                s := shareTime{}

                c.ShouldBindQuery(&s)

                if !testCT.Equal(s.CreateTime) {
                        c.String(500, "want %d got %d", testCT.UnixNano(), s.CreateTime)
                        return
                }

                c.JSON(200, s)
        })

        unix.GET("/sec", func(c *gin.Context) {
                s := shareTime{}

                c.ShouldBindQuery(&s)

                if !testUT.Equal(s.UnixTime) {
                        c.String(500, "want %d got %d", testCT.Unix(), s.UnixTime)
                        return
                }

                c.JSON(200, s)

        })

        r.Run()
}

```

* Contraction variable scope
2019-07-10 13:02:40 +08:00