prepareVars converts the route variable pairs into a map. If the route has a BuildVarsFunc, it is invoked.
(pairs ...string)
| 750 | // prepareVars converts the route variable pairs into a map. If the route has a |
| 751 | // BuildVarsFunc, it is invoked. |
| 752 | func (r *Route) prepareVars(pairs ...string) (map[string]string, error) { |
| 753 | m, err := mapFromPairsToString(pairs...) |
| 754 | if err != nil { |
| 755 | return nil, err |
| 756 | } |
| 757 | return r.buildVars(m), nil |
| 758 | } |
| 759 | |
| 760 | func (r *Route) buildVars(m map[string]string) map[string]string { |
| 761 | if r.buildVarsFunc != nil { |
no test coverage detected