ctx.go
func (ctx *ReqCtx) Params(v interface{}) error {
	if ctx.params == nil {
		return errors.New("ctx: request did not have any request parameters")
	}

	if err := json.Unmarshal(ctx.params, v); err != nil {
		return fmt.Errorf("ctx: cannot deserialize request params: %v", err)
	}

	return nil
}
func (ctx *ReqCtx) Params(v interface{}) error {
	if ctx.params == nil {
		return errors.New("ctx: request did not have any request parameters")
	}

	if err := json.Unmarshal(ctx.params, v); err != nil {
		return fmt.Errorf("ctx: cannot deserialize request params: %v", err)
	}

	return nil
}
// Params reads request parameters into given object.
// Object should be passed by reference.