You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use c.Set("isUser", true) to pass data to other handlers, sometimes in complex functions, we may use a few handlers inside a handler, some handlers may required some internal data to be set while other handlers do not need those data, so hope to have a function to "delete" the context.data
func abc123(c *routing.Context) error {
c.Set("name1", true)
err := cde123(c)
c.Delete("name1") // <-- hope to have something like that to delete internal data
err := cde123(c)
return nil
}
The text was updated successfully, but these errors were encountered:
We use
c.Set("isUser", true)
to pass data to other handlers, sometimes in complex functions, we may use a few handlers inside a handler, some handlers may required some internal data to be set while other handlers do not need those data, so hope to have a function to "delete" the context.dataThe text was updated successfully, but these errors were encountered: