-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Collector naming more ergonomic.
I've gone back and forth on the terminology, but am settling on: Run: func() or func() T -- was NoError Call: func() (T, error) -- was Task Report: func(report func(T)) error -- unchanged This use of "Run" aligns with the top-level Run function, as well as the Run method of the Group, which take no error. This use of "Call" aligns with the top-level "Call" function, which wants a value and an error. Keep the existing method names as aliases, but mark them deprecated. Also rename "NewCollector" as "Collect", which besides being shorter is also more evocative of what it's doing. The construction is not the important aspect of the collector, but what it provides.
- Loading branch information
1 parent
46f2412
commit 2248bec
Showing
4 changed files
with
41 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters