canonical / prometheus-k8s-operator

https://charmhub.io/prometheus-k8s
Apache License 2.0
21 stars 35 forks source link

Resolve duplication #367

Closed beliaev-maksim closed 2 years ago

beliaev-maksim commented 2 years ago

wrap duplicated code fragments into functions

simskij commented 2 years ago

The changes on line 577 and below I think makes sense from a deduplication and tidyness perspective. The earlier ones to me both make too many assumptions and do too much, making the dryness feel quite forced.