1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-30 16:27:04 +00:00

updates for neffos and re-push the fix of the request path with uri unescaped codes

Former-commit-id: fda1edb3e8dfc538da541070366f5f8f997bf367
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-06-06 23:05:17 +03:00
parent e19a519c6e
commit e10fada695
4 changed files with 9 additions and 9 deletions

View File

@@ -79,21 +79,21 @@ var (
// with the exact same incoming Message's Namespace (and Room if specified)
// except its body which would be the given "body".
Reply = neffos.Reply
// Object marshals the "v" value and returns a Message's Body.
// The "v" serialized value can be customized by implementing a `Marshal() ([]byte, error) ` method,
// Marshal marshals the "v" value and returns a Message's Body.
// The "v" value's serialized value can be customized by implementing a `Marshal() ([]byte, error) ` method,
// otherwise the default one will be used instead ( see `SetDefaultMarshaler` and `SetDefaultUnmarshaler`).
// Errors are pushed to the result, use the object's Marshal method to catch those when necessary.
Object = neffos.Object
Marshal = neffos.Marshal
)
// SetDefaultMarshaler changes the default json marshaler.
// See `Object` package-level function and `Message.Object` method for more.
// See `Marshal` package-level function and `Message.Unmarshal` method for more.
func SetDefaultMarshaler(fn func(v interface{}) ([]byte, error)) {
neffos.DefaultMarshaler = fn
}
// SetDefaultUnmarshaler changes the default json unmarshaler.
// See `Object` package-level function and `Message.Object` method for more.
// See `Message.Unmarshal` method and package-level `Marshal` function for more.
func SetDefaultUnmarshaler(fn func(data []byte, v interface{}) error) {
neffos.DefaultUnmarshaler = fn
}