mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
add fnction Mustremove for package gsession
This commit is contained in:
@ -348,3 +348,11 @@ func (s *Session) MustSize() int {
|
||||
}
|
||||
return size
|
||||
}
|
||||
|
||||
// MustRemove performs as function Remove, but it panics if any error occurs.
|
||||
func (s *Session) MustRemove(keys ...string) {
|
||||
err := s.Remove(keys...)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user