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.
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
[schema processor] Part 3 - Modifiers and Revisions #12147 #17020
[schema processor] Part 3 - Modifiers and Revisions #12147 #17020
Changes from 1 commit
58a7133
49ba868
af63a00
6dd9692
e5298f3
bf084ac
4d3ead6
78d6abf
084bc74
df76e55
811463d
b913d18
285982f
83c76a2
69cf2bb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason to use 10 as capacity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just a random number I pulled from no where.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: since it has no particular importance I think it can be safely deleted,
values := make([]*migrate.AttributeChangeSet)
should be good enough.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, (not sure when), but the latest version of go requires at least
len
and an optionalcap
.Tested it here (to make sure it wasn't a linter getting it in the way)
https://go.dev/play/p/9uNpeSYw6gN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Don't know what I was thinking. What I probably wanted to say is that you can start with an empty slice since
append
later will happily allocate as many as needed: