Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Non standard return value of 'ok' in FromError() #180

Description

@wiegell

Normally you would expect ok to be true, if a type assertion is correct, see e.g.:
https://go.dev/tour/methods/15

However for the FromError method the return value is false, when the underlying type assertion is correct (from docs):
image
From source:
image

That's not intuitive and goes against what "ok" means in many other cases in go.
Changing this would ofc. be a breaking change

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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