(s []string)
| 1450 | } |
| 1451 | |
| 1452 | func parseAnnotationFilters(s []string) ([]kubernetes.AnnotationFilters, error) { |
| 1453 | return parseAnnotationConfig(s, func(annotationKey, annotationValue, value string) (kubernetes.AnnotationFilters, error) { |
| 1454 | filters, err := eskip.ParseFilters(value) |
| 1455 | if err != nil { |
| 1456 | var zero kubernetes.AnnotationFilters |
| 1457 | return zero, err |
| 1458 | } |
| 1459 | return kubernetes.AnnotationFilters{ |
| 1460 | Key: annotationKey, |
| 1461 | Value: annotationValue, |
| 1462 | Filters: filters, |
| 1463 | }, nil |
| 1464 | }) |
| 1465 | } |
| 1466 | |
| 1467 | // parseAnnotationConfig parses a slice of strings in the "annotationKey=annotationValue=value" format |
| 1468 | // by calling parseValue function to convert (annotationKey, annotationValue, value) tuple into T. |
searching dependent graphs…