Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return nil when openFifo returns nil #47

Merged
merged 1 commit into from Dec 22, 2022

Commits on Nov 8, 2022

  1. Return nil when openFifo returns nil

    The return statement in the OpenFifo wrapper function implicitly boxes
    the *fifo pointer into an io.ReadWriteCloser interface value, even when
    the value is (*fifo)(nil). It is the same gotcha described in
    https://go.dev/doc/faq#nil_error and causes the same sorts of confusing
    situations. Modify the OpenFifo wrapper function to return a nil
    interface value when openFifo returns a nil pointer value.
    
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    corhere committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    10709dd View commit details
    Browse the repository at this point in the history