findParam lookups a parameter in the map and returns an error if it doesn't exist.
(name string)
| 738 | |
| 739 | // findParam lookups a parameter in the map and returns an error if it doesn't exist. |
| 740 | func (pars Params) findParam(name string) (*Param, error) { |
| 741 | if _, ok := pars[name]; !ok { |
| 742 | return nil, &errors.ErrParamNotFound{Name: name} |
| 743 | } |
| 744 | return pars[name], nil |
| 745 | } |
| 746 | |
| 747 | // Colorize renders the full parameter list for the {{.Params}} tag. |
| 748 | // Each entry is formatted as: key <separator> value, with the key in |
no outgoing calls
no test coverage detected