diff --git a/forms.go b/forms.go index b66522f..d91dc55 100644 --- a/forms.go +++ b/forms.go @@ -101,10 +101,10 @@ func (f FormValue) IsEmpty() bool { // GetFormArray gets multiple form values as string slice func (ctx Ctx) GetFormArray(key string) []string { var values []string - ctx.PostArgs().VisitAll(func(k, v []byte) { + for k, v := range ctx.PostArgs().All() { if string(k) == key { values = append(values, string(v)) } - }) + } return values } diff --git a/session.go b/session.go index 0fa2890..451c802 100644 --- a/session.go +++ b/session.go @@ -104,6 +104,10 @@ func (s *Session) GetFlash(key string) (any, bool) { return value, exists } +func (s *Session) DeleteFlash(key string) { + s.Delete("flash_" + key) +} + func (s *Session) GetFlashMessage(key string) string { if flash, exists := s.GetFlash(key); exists { if msg, ok := flash.(string); ok {