-
Notifications
You must be signed in to change notification settings - Fork 54
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
[composer][samplecode]Add writeSampleCode method #499
Conversation
src/main/java/com/google/api/generator/gapic/composer/samplecode/SampleCodeWriter.java
Outdated
Show resolved
Hide resolved
assertEquals(expected, result); | ||
} | ||
|
||
private AssignmentExpr createAssignmentExpr(String varName, String varValue, TypeNode type) { |
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 there is only one usage of this method, let's just call the internals directly and forego this wrapper.
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.
There are two usage above. Line 57, and line 58. I suggest to use the wrapper make the code clean.
Co-authored-by: Jeffrey Rennie <rennie@google.com> Co-authored-by: Tomo Suzuki <suztomo@google.com> Source-Link: https://togithub.com/googleapis/synthtool/commit/b59cf7b5a91ecab29e21fdfbb7e3b81066229be4 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:894d56f45fc3f4f0d5f3bcf790846419ee2d8e44715eae8917d6a1bba2b7283d
Add a helper function to writeSampleCode where it has been frequently used in #487 #493 #498 and future changes.