jinnovation / kele.el

🥤 Spritzy Kubernetes cluster management for Emacs
https://jonathanj.in/kele.el/
Apache License 2.0
72 stars 4 forks source link

Add function to look up arbitrary resource names in discovery cache #214

Closed jinnovation closed 1 month ago

jinnovation commented 1 month ago

To implement #212, we need the ability to convert from the kind name, e.g. Pod, to the plural form, e.g. pods. This would be analogous to the existing kele--get-singular-for-plural, e.g. kele--get-plural-for-kind.

Since we'd rather not implement one function for each 2-permutation of singular/plural/kind, we generalize the existing get-singular-for-plural to allow for looking up a "discovery resource" by any given key within it. This will allow us to look up with, say, singularName, and use the retval to get the kind.

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 62.90%. Comparing base (8082e53) to head (96177be).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #214 +/- ## ========================================== + Coverage 62.86% 62.90% +0.04% ========================================== Files 1 1 Lines 762 763 +1 ========================================== + Hits 479 480 +1 Misses 283 283 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.