fix pass []any as any in variadic function by asasalint (#5012)
* fix pass []any as any in variadic function * add change log
This commit is contained in:
@@ -78,7 +78,7 @@ func (ctx *Context) GetCookie(key string) string {
|
||||
// SetCookie Set cookie for response.
|
||||
// It's alias of BeegoOutput.Cookie.
|
||||
func (ctx *Context) SetCookie(name string, value string, others ...interface{}) {
|
||||
(*context.Context)(ctx).SetCookie(name, value, others)
|
||||
(*context.Context)(ctx).SetCookie(name, value, others...)
|
||||
}
|
||||
|
||||
// GetSecureCookie Get secure cookie from request by a given key.
|
||||
@@ -88,7 +88,7 @@ func (ctx *Context) GetSecureCookie(Secret, key string) (string, bool) {
|
||||
|
||||
// SetSecureCookie Set Secure cookie for response.
|
||||
func (ctx *Context) SetSecureCookie(Secret, name, value string, others ...interface{}) {
|
||||
(*context.Context)(ctx).SetSecureCookie(Secret, name, value, others)
|
||||
(*context.Context)(ctx).SetSecureCookie(Secret, name, value, others...)
|
||||
}
|
||||
|
||||
// XSRFToken creates a xsrf token string and returns.
|
||||
|
||||
@@ -47,7 +47,7 @@ func (output *BeegoOutput) Body(content []byte) error {
|
||||
// Cookie sets cookie value via given key.
|
||||
// others are ordered as cookie's max age time, path,domain, secure and httponly.
|
||||
func (output *BeegoOutput) Cookie(name string, value string, others ...interface{}) {
|
||||
(*context.BeegoOutput)(output).Cookie(name, value, others)
|
||||
(*context.BeegoOutput)(output).Cookie(name, value, others...)
|
||||
}
|
||||
|
||||
// JSON writes json to response body.
|
||||
|
||||
Reference in New Issue
Block a user