Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Open Core #1059

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

[Draft] Open Core #1059

wants to merge 4 commits into from

Conversation

ZhouXing19
Copy link
Contributor

@ZhouXing19 ZhouXing19 commented Oct 31, 2024

This PR is based on https://github.com/cockroachdb/replicator/tree/bob_core_open

This change is Reviewable

This change replaces the Range callback functions with the new iterator type
compatible with the range keyword in go 1.23.

The various map-like types receive iterator methods All(), Keys(), and
Values(). The names of these methods are in line with the new iterator methods
in the stdlib maps package. The Entries() and Range() methods are removed.

The apply templates were the only actual use of Entries(), which has been
hoisted into a template helper function to support deadlined columns.

The net effect is to make flow-control more idiomatic. There were some cases
where one would write "return nil" within a Range() callback when "continue"
would be more natural or the use of "return sentinelError" when "break" would
be the obvious choice. Many cases of always-nil error handling have been
removed as well.

The compiler has improved generic type inference and some explicit type
parameterizations have been removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants