Use the Repl type in Reverse
This commit is contained in:
parent
b7a3e1c013
commit
01573ad190
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ type URLs struct {
|
|||
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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue