all: rename schema.Kind to TypeKind, ipld.ReprKind to Kind#127
Merged
Conversation
warpfork
requested changes
Dec 20, 2020
warpfork
left a comment
Collaborator
There was a problem hiding this comment.
I'm so happy about this. This rename is long due, and the new code reads much better all over the place. Thank you for grinding this through!
I found a couple spots where things got renamed to TypeKind where they should still be just Kind in the new nomenclature. Everything is logically correct of course, but the names are off. I hope it's not too much work to flip those back. And after that I'll be really excited to merge this! :)
As discussed on the issue thread, ipld.Kind and schema.TypeKind are more intuitive, closer to the spec wording, and just generally better in the long run. The changes are almost entirely automated via the commands below. Very minor changes were needed in some of the generators, and then gofmt. sed -ri 's/\<Kind\(\)/TypeKind()/g' **/*.go git checkout fluent # since it uses reflect.Value.Kind sed -ri 's/\<Kind_/TypeKind_/g' **/*.go sed -i 's/\<Kind\>/TypeKind/g' **/*.go sed -i 's/ReprKind/Kind/g' **/*.go Plus manually undoing a few renames, as per Eric's review. Fixes #94.
Contributor
Author
|
Thanks for the suggestions! All applied, I think. |
Collaborator
|
Big hoorays! 🎊 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed on the issue thread, ipld.Kind and schema.TypeKind are more
intuitive, closer to the spec wording, and just generally better in the
long run.
The changes are almost entirely automated via the commands below. Very
minor changes were needed in some of the generators, and then gofmt.
Fixes #94.