Compare commits
No commits in common. "01573ad190993d90d5a14ceda8764b1f9f956ca0" and "815bdbb5677d57448da1446ad3fd867651fd55a3" have entirely different histories.
01573ad190
...
815bdbb567
1 changed files with 1 additions and 3 deletions
|
|
@ -26,10 +26,8 @@ type URLs struct {
|
||||||
Prefix string
|
Prefix string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Repl map[string]string
|
|
||||||
|
|
||||||
// Given a name and replacements, return a rendered path component of a URL
|
// Given a name and replacements, return a rendered path component of a URL
|
||||||
func (urls URLs) Reverse(name string, replacements Repl) string {
|
func (urls URLs) Reverse(name string, replacements map[string]string) string {
|
||||||
pattern := urls.URLs[name].Path
|
pattern := urls.URLs[name].Path
|
||||||
|
|
||||||
for key, val := range replacements {
|
for key, val := range replacements {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue