package fixture // Not compiled. verifyArchive's shape: fail is a local closure configured as // a sink, so every call to it is checked. A call through an alias of it is // not, and passes an error's text. type Check struct{ Reason string } func verify(err error) Check { var out Check fail := func(reason string) Check { out = Check{Reason: reason} return out } if err == nil { return fail("the archive is not readable") } send := fail return send(err.Error()) }