Skip to content

what about channel receives? #191

@seebs

Description

@seebs

While writing a similar tool, I ended up spending some time pondering under what circumstances Go allows a value to be generated-but-not-consumed. And there aren't all that many; it's mostly function call return values, since functions could have side-effects.

So could channel receives. So consider:

func foo(x chan error) {
  <-x
}

I would argue that this constitutes "failing to check an error".

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions