(rules []*pushrules.Rule, id string)
| 315 | } |
| 316 | |
| 317 | func pushRuleIndexByID(rules []*pushrules.Rule, id string) int { |
| 318 | for i, rule := range rules { |
| 319 | if rule.RuleID == id { |
| 320 | return i |
| 321 | } |
| 322 | } |
| 323 | return -1 |
| 324 | } |
| 325 | |
| 326 | func pushRuleAttrGetter(attr string) (func(*pushrules.Rule) interface{}, error) { |
| 327 | switch attr { |
no outgoing calls
no test coverage detected