Skip to content

Improve CloseError API #128

@nhooyr

Description

@nhooyr

I think the current API is a little obnoxious since it forces you to use xerrors.As to get the close error code which is very annoying.

Also people forget to use xerrors.As, see https://github.com/sumorf/deribit-api/blob/6b581052e02d0808bed0bdc7a04f3dc4582e70d3/stream.go#L30

@sumorf

I don't like the ceremony involved with xerrors.As so I'd like to provide some sort of convenience API to get the error code.

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