-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: migrate topics and subscriptions #2064
Conversation
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.
Niiiiiiice
return optional.Some(callExpr) | ||
} | ||
|
||
func FuncPathEquals(pass *analysis.Pass, callExpr *ast.CallExpr, path string) bool { |
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: should we add comments to this func and the one above since they're public?
if _, ok = md.Type.(*schema.Data); !ok && md.Type != nil { | ||
return optional.None[*schema.Data]() | ||
} | ||
common.ApplyMetadata[*schema.Data](pass, named.Obj(), func(md *common.ExtractedMetadata) { |
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.
Nice!
varName := topicSelExp.Sel.Name | ||
topicRef = &schema.Ref{ | ||
Module: moduleIdent.Name, | ||
Name: strcase.ToLowerCamel(string(varName[0]) + varName[1:]), |
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.
is it safe to index into varName
here without checking len?
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.
ah nice catch- i'm not sure, this logic is directly ported. i'll add a check to be safe
66a3782
to
73ff666
Compare
No description provided.