Skip to content

[Cleanup] Standardize empty string checks across pkg/ #1659

@shubhtrek

Description

@shubhtrek

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions