package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Oct 21, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package errcount provides an easy to use error counter which
returns error count and last error so as to not overwhelm the user
with errors.
ErrCount stores the state of the error counter.
New makes a new error counter
Add an error to the error count.
err may be nil.
Thread safe.
Err returns the error summary so far - may be nil
txt is put in front of the error summary
txt: %d errors: last error: %w
or this if only one error
txt: %w
Thread safe.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.