Add Repl type
Adds as alias for map[string]string
This commit is contained in:
parent
815bdbb567
commit
b7a3e1c013
1 changed files with 2 additions and 0 deletions
|
|
@ -26,6 +26,8 @@ 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 {
|
||||
pattern := urls.URLs[name].Path
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue