contour-operator icon indicating copy to clipboard operation
contour-operator copied to clipboard

consider shortening names for functions under internal/objects

Open skriss opened this issue 4 years ago • 2 comments

Now that the helpers for different object types have each moved into their own package, some of the function names are redundant, e.g. clusterrole.EnsureClusterRole, clusterrole.CurrentClusterRole, etc. It'd help readability to simplify some of these names. Here's a quick PoC of what some shortened names could look like:

https://github.com/projectcontour/contour-operator/compare/main...skriss:exp-internal-objects-naming?expand=1

If folks think that pattern reads better, I can go through and make all the changes.

cc @projectcontour/maintainers

skriss avatar Feb 24 '21 21:02 skriss

+1 fan of that pattern and reducing duplication

sunjayBhatia avatar Feb 24 '21 23:02 sunjayBhatia

I agree that we should try and reduce stuttering when reading the actual call sites.

youngnick avatar Mar 01 '21 00:03 youngnick