While working on pkg/constants, I noticed that the codebase currently uses a mix of if s == "" and if len(s) == 0 to check for empty strings. While both achieve the same result, standardizing to a single idiomatic style makes the code more consistent and readable.
The Task:
Scan the pkg/ directory for instances of len(s) == 0 used on string types.
Refactor these to use the more idiomatic s == "" check.
Ensure no functional logic is altered; this is purely a consistency cleanup.
I’m happy to take this on and submit a PR if the maintainers agree!
While working on pkg/constants, I noticed that the codebase currently uses a mix of if s == "" and if len(s) == 0 to check for empty strings. While both achieve the same result, standardizing to a single idiomatic style makes the code more consistent and readable.
The Task:
Scan the pkg/ directory for instances of len(s) == 0 used on string types.
Refactor these to use the more idiomatic s == "" check.
Ensure no functional logic is altered; this is purely a consistency cleanup.
I’m happy to take this on and submit a PR if the maintainers agree!