withGroup returns a new handler with the given attribute group added.
(group attrGroup)
| 225 | |
| 226 | // withGroup returns a new handler with the given attribute group added. |
| 227 | func (h *Handler) withGroup(group attrGroup) *Handler { |
| 228 | h2 := *h |
| 229 | h2.groups = append(slices.Clip(h.groups), group) |
| 230 | h2.hooks = slices.Clip(h.hooks) |
| 231 | return &h2 |
| 232 | } |