(policy AutogenPolicy)
| 65 | } |
| 66 | |
| 67 | func normalizeAutogenPolicy(policy AutogenPolicy) (AutogenPolicy, error) { |
| 68 | maxLen := policy.MaxTypeIDLen |
| 69 | if maxLen <= 0 { |
| 70 | maxLen = defaultMaxTypeIDLen |
| 71 | } |
| 72 | if maxLen < 4 { |
| 73 | return AutogenPolicy{}, fmt.Errorf("autogen max type.id len must be >= 4, got %d", maxLen) |
| 74 | } |
| 75 | policy.MaxTypeIDLen = maxLen |
| 76 | return policy, nil |
| 77 | } |
| 78 | |
| 79 | func compileEngineSelector(expr metrixselector.Expr) (metrixselector.Selector, error) { |
| 80 | if expr.Empty() { |
no test coverage detected
searching dependent graphs…