GoogleCloudPlatform / GoogleCloudPlatform/samples-style-guide

Proposal: Clarify Process the Result "no return type"

Open
#169 0 comments 0 reactions 0 assignees View on GitHub
guideline: request type: bug
Dominant language
HTML
Stars
13
Forks
17
PR merge metrics
No merged PRs in 30d

Description

### Description

In [Process the Result](https://googlecloudplatform.github.io/samples-style-guide/#result), we specify "Methods should avoid a return type whenever possible."

This is not sufficiently clear.

Samples should not return values as part of presenting how to work with the API response. Instead, they should output meaningful properties from the response object to teach developers how to work with the response, and confirm for folks running the code that it works as expected.

A [PR to address better code examples](https://github.com/GoogleCloudPlatform/samples-style-guide/pull/168) has been opened, which addresses #135, #136, #137, but not the main guideline text.

### Impact

This is clarifying a generally understood sample guideline amongst existing sample contributors, and help clarify the expectation for folks onboarding to samples.

### Challenge

This is a clarification of the existing guideline.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.