Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c9bed954a4 | |||
| 01573ad190 | |||
| b7a3e1c013 |
2 changed files with 4 additions and 2 deletions
|
|
@ -26,8 +26,10 @@ type URLs struct {
|
|||
Prefix string
|
||||
}
|
||||
|
||||
type Repl map[string]string
|
||||
|
||||
// Given a name and replacements, return a rendered path component of a URL
|
||||
func (urls URLs) Reverse(name string, replacements map[string]string) string {
|
||||
func (urls URLs) Reverse(name string, replacements Repl) string {
|
||||
pattern := urls.URLs[name].Path
|
||||
|
||||
for key, val := range replacements {
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,3 +1,3 @@
|
|||
module gitea.gwairfelin.com/max/gispatcho
|
||||
module forgejo.gwairfelin.com/max/gispatcho
|
||||
|
||||
go 1.23.5
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue