Skip to content

Type mismatch in AppendUint #1805

@gaby

Description

@gaby

@erikdubbelboer We were implementing some changes in Fiber and noticed that AppendUint takes an int instead of an uint. We also noticed there's no AppendInt available.

In several parts of Fasthttp when a value below 0 is passed it throws a panic, instead of enforcing this by using uint.

Is this a bug, or was intended? Seems the code was added a long time ago

Affected code: https://github.com/valyala/fasthttp/blob/master/bytesconv.go#L124

Would it make sense to make the param uint and adding another function named AppendInt to fasthttp?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions