GoogleCloudPlatform / GoogleCloudPlatform/samples-style-guide

Proposal: make Go snippets runnable

Open
#91 4 comments 0 reactions 1 assignee Claimed by @tritone View on GitHub
guideline: request type: feature request
Dominant language
HTML
Stars
13
Forks
17
PR merge metrics
No merged PRs in 30d

Description

### Description

We have gotten doc feedback issues complaining that the Go snippets are not readily copy-paste-runnable when written using the current guidelines. I'm not convinced that there is a better approach we could take, but filing an issue for discussion.

### Impact

New guidelines could make it easier for users (especially newbies to Go) to run sample code files directly, or be able to paste it more easily into a main func.

### Challenge

Potentially this could introduce even more cruft into snippet-type samples which are already quite long to include imports, client initialization and cleanup, etc, negatively impacting clarify for doc readers.

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.