giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
cache-seeder / gobuild (push) Canceled after 0s
cache-seeder / lint (bindata, lint-backend) (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s
Includes direct password setup links in registration emails. Assisted-by: Codex:GPT-5
42 lines
866 B
Go
42 lines
866 B
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package web
|
|
|
|
// Combo represents a tiny group routes with same pattern
|
|
type Combo struct {
|
|
r *Router
|
|
pattern string
|
|
h []any
|
|
}
|
|
|
|
// Get delegates Get method
|
|
func (c *Combo) Get(h ...any) *Combo {
|
|
c.r.Get(c.pattern, append(c.h, h...)...)
|
|
return c
|
|
}
|
|
|
|
// Post delegates Post method
|
|
func (c *Combo) Post(h ...any) *Combo {
|
|
c.r.Post(c.pattern, append(c.h, h...)...)
|
|
return c
|
|
}
|
|
|
|
// Delete delegates Delete method
|
|
func (c *Combo) Delete(h ...any) *Combo {
|
|
c.r.Delete(c.pattern, append(c.h, h...)...)
|
|
return c
|
|
}
|
|
|
|
// Put delegates Put method
|
|
func (c *Combo) Put(h ...any) *Combo {
|
|
c.r.Put(c.pattern, append(c.h, h...)...)
|
|
return c
|
|
}
|
|
|
|
// Patch delegates Patch method
|
|
func (c *Combo) Patch(h ...any) *Combo {
|
|
c.r.Patch(c.pattern, append(c.h, h...)...)
|
|
return c
|
|
}
|