Open tritone opened 2 years ago
Could you provide some more specifics on things that should be changed?
In reading this proposal, my initial thought is whether this is about the current style guide, or about updating more of the golang samples to match the style guide.
I think the discussion on this was about making it easy as possible to run the sample, which would mean including a main func users can use to execute.
That seems at odds with or be able to paste it more easily into a main func
.
Assigned to @tritone for clarification.
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.