Skip to content

Commit 9a02be0

Browse files
committed
snippet go no comment
1 parent c83a12b commit 9a02be0

File tree

6 files changed

+6
-1
lines changed

6 files changed

+6
-1
lines changed

scripts/specs/snippets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function transformCodeSamplesToGuideMethods(snippetSamples: SnippetSample
2727
}
2828

2929
for (const [sampleName, sample] of Object.entries(samples)) {
30-
const sampleMatch = sample.match(/.*Initialize the client\n(.*)((.|\n)*)(.*Call the API\n)((.|\n)*)/);
30+
const sampleMatch = sample.match(/.*Initialize the client.*\n(.*)((.|\n)*)(.*Call the API\n)((.|\n)*)/);
3131
if (!sampleMatch) {
3232
continue;
3333
}

templates/javascript/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export {{#isAsync}}async{{/isAsync}} function snippetFor{{#lambda.pascalcase}}{{
1818

1919
// Call the API
2020
{{#hasResponse}}const response = {{/hasResponse}}{{> tests/method}};
21+
2122
{{#hasResponse}}
2223
// use typed response
2324
console.log(response);

templates/kotlin/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class Snippet{{client}} {
2121

2222
// Call the API
2323
{{#hasResponse}}var response = {{/hasResponse}}client.{{> tests/method}}
24+
2425
{{#hasResponse}}
2526
// Use the response
2627
println(response)

templates/php/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Snippet{{client}}
2525

2626
// Call the API
2727
{{#hasResponse}}$response = {{/hasResponse}}{{> tests/method}};
28+
2829
{{#hasResponse}}
2930
// play with the response
3031
var_dump($response);

templates/python/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ async def snippet_for_{{#lambda.snakecase}}{{method}}{{/lambda.snakecase}}{{test
1717

1818
# Call the API
1919
{{#hasResponse}}response = {{/hasResponse}}{{#isAsync}}await {{/isAsync}}_client.{{#lambda.snakecase}}{{method}}{{/lambda.snakecase}}({{#parametersWithDataType}}{{> tests/generateParams}}{{/parametersWithDataType}}{{#hasRequestOptions}} request_options={ {{#requestOptions.headers.parameters}}"headers":loads("""{{{.}}}"""),{{/requestOptions.headers.parameters}}{{#requestOptions.queryParameters.parameters}}"query_parameters":loads("""{{{.}}}"""),{{/requestOptions.queryParameters.parameters}} }{{/hasRequestOptions}})
20+
2021
{{#hasResponse}}
2122
# use the class directly
2223
print(response)

templates/scala/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Snippet{{client}} {
3333

3434
// Call the API
3535
{{#hasResponse}}val response = {{/hasResponse}}{{> tests/method}}
36+
3637
{{#hasResponse}}
3738
// Use the response
3839
val value = Await.result(response, Duration(100, "sec"))

0 commit comments

Comments
 (0)