google-cloud-go
google-cloud-go copied to clipboard
chore: add snippetgen phase 2
Here is the summary of changes.
You are about to add 1 region tag.
-
internal/generated/snippets/speech/apiv1/AdaptationClient/create_custom_class.go:19, tag
speech_v1_generated_Adaptation_CreateCustomClass_sync
This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run
label or use the checkbox below:
- [ ] Refresh this comment
@amanda-tarafa @codyoss @tbpg
I replaced internal/generated/snippets/speech/apiv1/AdaptationClient/create_custom_class.go
with speech/apiv1/adaptation_client_create_custom_class_example_test.go
as the target output for the generator.
The goal is to support godoc examples, Cloud Rad, and snippets with the same output file. (Or nearly the same file, the region tags that appear here should probably be added later to a copy of this content, as is done today with generator examples and Phase 1 snippets.)
See Testable Examples in Go - Larger examples for background on how this works. The conversion from sort/example_keys_test.go source to the published SortKeys example godoc provides a demonstration.
@amanda-tarafa @codyoss @tbpg
I replaced
internal/generated/snippets/speech/apiv1/AdaptationClient/create_custom_class.go
withspeech/apiv1/adaptation_client_create_custom_class_example_test.go
as the target output for the generator.The goal is to support godoc examples, Cloud Rad, and snippets with the same output file. (Or nearly the same file, the region tags that appear here should probably be added later to a copy of this content, as is done today with generator examples and Phase 1 snippets.)
See Testable Examples in Go - Larger examples for background on how this works. The conversion from sort/example_keys_test.go source to the published SortKeys example godoc provides a demonstration.
The only thing I would say about the file name is that it should probably include the config ID (Basic in this case) as we may have several different samples for the same RPC, but config ID is unique for a given Service/RPC pair.
I'd separate the idea of the GoDoc example
file and the generated snippet output file. They can be in separate spots and that's fine. The GoDoc ones show up in GoDoc and need a different format than snippetgen. Unless that's causing issues for some reason?
Closing this as I think this will no longer be happening here.