fix(deps): update module github.com/kataras/iris/v12 to v12.2.0-alpha3 #456
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v12.2.0-alpha2
->v12.2.0-alpha3
Release Notes
kataras/iris
v12.2.0-alpha3
Compare Source
Next (currently v12.2.0-alpha3)
This release introduces new features and some breaking changes.
The codebase for Dependency Injection, Internationalization and localization and more have been simplified a lot (fewer LOCs and easier to read and follow up).
Fixes and Improvements
Replace json-iterator with go-json as requested at #1818.
New
iris.IsErrEmptyJSON(err) bool
which reports whether the given "err" is caused by aContext.ReadJSON
call when the request body didn't start with { (or it was totally empty).Example Code:
That means that the client can optionally set a JSON body.
New
APIContainer.EnableStrictMode(bool)
to disable automatic payload binding and panic on missing dependencies for exported struct'sfields or function's input parameters on MVC controller or hero function or PartyConfigurator.New
Party.PartyConfigure(relativePath string, partyReg ...PartyConfigurator) Party
helper, registers a children Party likeParty
andPartyFunc
but instead it accepts a structure value which may contain one or more of the dependencies registered byRegisterDependency
orConfigureContainer().RegisterDependency
methods and fills the unset/zero exported struct's fields respectfully (useful when the api's dependencies amount are too much to pass on a function).New feature: add the ability to set custom error handlers on path type parameters errors (existing or custom ones). Example Code:
Improve the performance and fix
:int, :int8, :int16, :int32, :int64, :uint, :uint8, :uint16, :uint32, :uint64
path type parameters couldn't accept a positive number written with the plus symbol or with a leading zeroes, e.g.+42
and021
.The
iris.WithEmptyFormError
option is respected oncontext.ReadQuery
method too, as requested at #1727. Example comments were updated.New
httptest.Strict
option setter to enable thehttpexpect.RequireReporter
instead of the default `httpexpect.AssetReporter. Use that to enable complete test failure on the first error. As requested at: #1722.New
uuid
builtin path parameter type. Example:New
Configuration.KeepAlive
andiris.WithKeepAlive(time.Duration) Configurator
added as helpers to start the server using a tcp listener featured with keep-alive.New
DirOptions.ShowHidden bool
is added by @tuhao1020 at PR #1717 to show or hide the hidden files whenShowList
is set to true.New
Context.ReadJSONStream
method andJSONReader
options forContext.ReadJSON
andContext.ReadJSONStream
, see the example.New
FallbackView
feature, per-party or per handler chain. Example can be found at: _examples/view/fallback.versioning.Aliases
middleware and up to 80% faster version resolve. Example Code:New Basic Authentication middleware. Its
Default
function has not changed, however, the rest, e.g.New
contains breaking changes as the new middleware features new functionalities.Add
iris.DirOptions.SPA bool
field to allow Single Page Applications under a file server.A generic User interface, see the
Context.SetUser/User
methods in the New Context Methods section for more. In-short, the basicauth middleware's stored user can now be retrieved throughContext.User()
which provides more information than the nativectx.Request().BasicAuth()
method one. Third-party authentication middleware creators can benefit of these two methods, plus the Logout below.A
Context.Logout
method is added, can be used to invalidate basicauth or jwt client credentials.Add the ability to share functions between handlers chain and add an example on sharing Go structures (aka services).
Add the new
Party.UseOnce
method to the*Route
Add a new
*Route.RemoveHandler(...interface{}) int
andParty.RemoveHandler(...interface{}) Party
methods, delete a handler based on its name or the handler pc function.Redis Driver is now based on the go-redis module. Radix and redigo removed entirely. Sessions are now stored in hashes which fixes issue #1610. The only breaking change on default configuration is that the
redis.Config.Delim
option was removed. The redis sessions database driver is now defaults to the&redis.GoRedisDriver{}
. End-developers can implement their own implementations too. TheDatabase#Close
is now automatically called on interrupt signals, no need to register it by yourself.Add builtin support for i18n pluralization. Please check out the following yaml locale example to see an overview of the supported formats.
Fix #1650
Fix #1649
Fix #1648
Fix #1641
Add
Party.SetRoutesNoLog(disable bool) Party
to disable (the new) verbose logging of next routes.Add
mvc.Application.SetControllersNoLog(disable bool) *mvc.Application
to disable (the new) verbose logging of next controllers. As requested at #1630.Fix #1621 and add a new
cache.WithKey
to customize the cached entry key.Add a
Response() *http.Response
to the Response Recorder.Fix Response Recorder
Flush
when transfer-encoding ischunked
.Fix Response Recorder
Clone
concurrent access afterwards.Add a
ParseTemplate
method on view engines to manually parse and add a template from a text as requested. Examples.Full
http.FileSystem
interface support for all view engines as requested. The first argument of the functions(HTML
,Blocks
,Pug
,Amber
,Ace
,Jet
,Django
,Handlebars
) can now be either a directory ofstring
type (like before) or a value which completes thehttp.FileSystem
interface. The.Binary
method of all view engines was removed: pass the go-bindata's latest versionAssetFile()
exported function as the first argument instead of string.Add
Route.ExcludeSitemap() *Route
to exclude a route from sitemap as requested in chat, also offline routes are excluded automatically now.Improved tracing (with
app.Logger().SetLevel("debug")
) for routes. Screens:DBUG Routes (1)
DBUG Routes (2)
DBUG Routes (3)
Update the pprof middleware.
New
Controller.HandleHTTPError(mvc.Code) <T>
optional Controller method to handle http errors as requested at: MVC - More Elegent OnErrorCode registration?. Example can be found here.Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.