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

[composer][samplecode]Add writeSampleCode method #499

Merged
merged 7 commits into from
Nov 17, 2020

Conversation

summer-ji-eng
Copy link
Contributor

Add a helper function to writeSampleCode where it has been frequently used in #487 #493 #498 and future changes.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Nov 17, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 17, 2020
assertEquals(expected, result);
}

private AssignmentExpr createAssignmentExpr(String varName, String varValue, TypeNode type) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@summer-ji-eng summer-ji-eng merged commit 317beb4 into master Nov 17, 2020
@summer-ji-eng summer-ji-eng deleted the add_sample_code_writer branch November 17, 2020 21:57
suztomo added a commit that referenced this pull request Dec 16, 2022
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
suztomo pushed a commit that referenced this pull request Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants