| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
| return func(ctx *fasthttp.RequestCtx) { | ||
| headers := map[string][]string{} | ||
|
|
||
| ctx.Request.Header.VisitAll(func(k, v []byte) { |
There was a problem hiding this comment.
Visitall is a deprecated function, that's why I have replaced it
Sorry, something went wrong.
| } | ||
|
|
||
| if !(len(a.value) == 0) { | ||
| if len(a.value) > 0 { |
There was a problem hiding this comment.
it's easier and faster to read like that when you do not have to calculate in memory the boolean expression
Sorry, something went wrong.
| } | ||
|
|
||
| if !(b.value == true) { | ||
| if b.value { |
There was a problem hiding this comment.
value is already a boolean, so comparing to another boolean does not make really sense
Sorry, something went wrong.
| switch f.DigitSeparator { | ||
| case DigitSeparatorUnderscore: | ||
| separator = "_" | ||
| break |
There was a problem hiding this comment.
break is not necessary in Golang in a switch.
Sorry, something went wrong.
| httpClient = &clientCopy | ||
| r.config.Client = &clientCopy | ||
| } | ||
| return |
There was a problem hiding this comment.
here there was a possibility for httpClient to be nil. So I have moved the return statement to avoid this situation
Sorry, something went wrong.
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
|
I don't get why the build is failing. If you are interested by this PR, do you mind to guide me @gavv ? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Hello,
I would like to update the dependencies of this project. It's been a while it has not been done :)