Releases: xgfone/ship
Releases · xgfone/ship
v1.9.0
- Added:
- Use
github.com/xgfone/go-tools/v6
instead ofgithub.com/xgfone/go-tools
, which requiresGo1.11+
. - Add the method
Stop
forShip
, which is short forShip.Shutdown(context.Background())
. JSONBinder
andXMLBinder
do nothing whenContentLength
is equal to 0.
- Use
- Changed:
- Change the supported GO version from
1.7+
to1.11+
.
- Change the supported GO version from
v1.8.0
- Added:
Context.Error
supports the errorHTTPError
.- Add some convenient methods for
Context
, such asReferer
,UserAgent
,BasicAuth
,FormFile2
,MultipartReader
, andContext
(context.Context).
- Fixed:
- Fix some bugs.
- Others:
- Enhance the robustness of
ContentType
andCharset
ofContext
.
- Enhance the robustness of
v1.7.0
- Added:
- Add the route modifier to modify the route before registering it.
- Add the route filter to filter unacceptable route before registering it.
- Add some new methods for
Context
, such asBody()
,Path()
,Hostname()
,RespHeader()
,ReqHeader()
andSetRequest(newReq)
.
v1.6.0
v1.5.0
- Added:
- Add the
CORS
middleware. - Add the function
FromFunc
to convert a function to a middleware. - Add the method
Error(code, error)
forContext
to emit the response based on an error. - Add the method
AddHeader(name, value)
forContext
to append thevalue
of the headername
.
- Add the
- Fixed:
- Fix the stack depth of the builtin implementation of
Logger
.
- Fix the stack depth of the builtin implementation of