ignore
Ignore unimportant error values
Project Overview
Module gophers.dev/pkgs/ignore
provides a package with functions for ignoring
unimportant error values. These are useful for indicating errors that do not matter,
while also getting your IDE to stop highlighting ignored error returns.
Getting Started
The ignore
package can be installed by running
go get gophers.dev/pkgs/ignore
Example Usage of ignore
// Close, the old way
// _ = closer.Close()
// Close, the new way
ignore.Close(closer)
// Drain, the old way
// _, _ = io.Copy(io.Discard, reader)
// _ = reader.Close()
// Drain, the new way
ignore.Drain(reader)
Contributing
The gophers.dev/pkgs/ignore
module is always improving with new features
and error corrections. For contributing bug fixes and new features please file an issue.
License
The gophers.dev/pkgs/ignore
module is open source under the BSD-3-Clause license.