Skip to content

Use http.StatusContinue constant instead of 100 for clarity in status code comparison #4489

@anfaas1618

Description

@anfaas1618

Feature Description

Improve code clarity and correctness by replacing the broad status >= 100 check with http.StatusContinue and an explicit 199 upper bound to clearly target the 1xx informational range, where HTTP disallows response bodies. This removes magic numbers, expresses intent, and makes status comparisons easier to understand and maintain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalGot an idea for a feature that Gin doesn't have currently? Submit your idea here!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions