-
Notifications
You must be signed in to change notification settings - Fork 18k
doc: improve example coverage #16360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks great to me. Added the 'Unplanned' milestone because these are not tied to a specific release. Added the 'HelpWanted' label as this is something anyone can work on. Thanks for the list! |
Welcome - I'm going to start working on at least few of them. |
CL https://golang.org/cl/25173 mentions this issue. |
CL https://golang.org/cl/25575 mentions this issue. |
CL https://golang.org/cl/26696 mentions this issue. |
CL https://golang.org/cl/26697 mentions this issue. |
`bytes` and `strings` are pretty similar to each other, this commit brings `strings` examples to its counter-part. Partially addresses #16360 Change-Id: I551320eaa78be9df69012035f1c3333f500e04c9 Reviewed-on: https://go-review.googlesource.com/25062 Reviewed-by: Andrew Gerrand <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Hi! I'd love to contribute to this. Is there anything in particular you would like home @ccirello? :) |
@RobbieMcKinstry contributions are always welcome. I suggest you looking for the package you care most or is most knowledgeable about and start with it. If you find something that's not in the list above, it won't be a problem - go ahead and work on it. |
@ccirello Great idea. I'd love to contribute whatever I can. +1 |
CL https://golang.org/cl/27398 mentions this issue. |
CL https://golang.org/cl/27433 mentions this issue. |
Updates #16360 Change-Id: Idd8523b5a9a496ebd9c6e3b89c30df539842a139 Reviewed-on: https://go-review.googlesource.com/27433 Reviewed-by: C Cirello <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
CL https://golang.org/cl/27443 mentions this issue. |
Partially addresses #16360 Change-Id: I67a328302d7d91231f348d934e4232fcb844830a Reviewed-on: https://go-review.googlesource.com/27398 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Partially fixes golang#16360 Change-Id: I01563031a1c105e54499134eed4789f6219f41ec
CL https://golang.org/cl/27993 mentions this issue. |
CL https://golang.org/cl/26930 mentions this issue. |
Partially addresses #16360 Change-Id: Ic098d2c465742fb50aee325a3fd0e1d50b7b3c99 Reviewed-on: https://go-review.googlesource.com/25575 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
CL https://golang.org/cl/28482 mentions this issue. |
Updates #16360 Change-Id: I5927cffa961cd85539a3ba9606b116c5996d1096 Reviewed-on: https://go-review.googlesource.com/26696 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]>
Fixes #11254. Updates #16360. Implements examples using all exported functions. This CL also updates Decode documentation to state that only hexadecimal characters are accepted in the source slice src, but also that the length of src must be even. Change-Id: Id016a4ba814f940cd300f26581fb4b9d2aded306 Reviewed-on: https://go-review.googlesource.com/28482 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]>
Fixes #16884 Updates #16360 Change-Id: I01563031a1c105e54499134eed4789f6219f41ec Reviewed-on: https://go-review.googlesource.com/27993 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Add function level examples to the package. Partially addresses #16360 Change-Id: I7162aed4e4a969743c19b79c9ffaf9217d2c1c08 Reviewed-on: https://go-review.googlesource.com/26930 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
CL https://golang.org/cl/28992 mentions this issue. |
CL https://golang.org/cl/28963 mentions this issue. |
Updates #16360. Adds examples for: + Chmod + Chtimes + FileMode Change-Id: I1b61ee0392fa3774593a7f36aaf0fa1e484c778b Reviewed-on: https://go-review.googlesource.com/28963 Run-TryBot: Andrew Gerrand <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Andrew Gerrand <[email protected]>
CL https://golang.org/cl/29150 mentions this issue. |
CL https://golang.org/cl/29218 mentions this issue. |
Updates #16360. Adds examples for: + CombinedOutput + StdinPipe + StderrPipe Change-Id: I19293e64b34ed9268da00e0519173a73bfbc2c10 Reviewed-on: https://go-review.googlesource.com/29150 Run-TryBot: Andrew Gerrand <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Andrew Gerrand <[email protected]>
CL https://golang.org/cl/29375 mentions this issue. |
… a file Updates #16360. Change-Id: I75714d2b5f095fe39fd81edfa6dd9e44d7c44da1 Reviewed-on: https://go-review.googlesource.com/29375 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
CL https://golang.org/cl/29443 mentions this issue. |
Updates #16360 Change-Id: I80b981aa291a8e16d2986d4a2dfd84d3819bf488 Reviewed-on: https://go-review.googlesource.com/29443 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Joe Tsai <[email protected]>
partially addresses #16360 Change-Id: I8274825b9ca6aec46294c8513b4795b0eb3062a2 Reviewed-on: https://go-review.googlesource.com/28992 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Updates #16360. Adds examples uing: + Writer, Reader + Reader.Multistream to concatenate and then individually retrieve multiple gzipped files + Reset Change-Id: I9ad9b92729a5cd58f7368eaf2db05f1cdf21063d Reviewed-on: https://go-review.googlesource.com/29218 Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Joe Tsai <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
CL https://golang.org/cl/29611 mentions this issue. |
CL https://golang.org/cl/30162 mentions this issue. |
CL https://golang.org/cl/30103 mentions this issue. |
Updates #16360 Change-Id: I0e0afe7a89f2ebcb3e5bbc345f77a605d3afc398 Reviewed-on: https://go-review.googlesource.com/30103 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
CL https://golang.org/cl/30554 mentions this issue. |
Updates #16360 Change-Id: I941519981ff5bda3a113e14fa6be718eb4d2bf83 Reviewed-on: https://go-review.googlesource.com/30554 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
For #16360. Change-Id: Iaa3548704786018eacec530f7a907b976fa532fe Reviewed-on: https://go-review.googlesource.com/27443 Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
CL https://golang.org/cl/31137 mentions this issue. |
There have been a ton of examples added to tip (for Go 1.8) so far. I'm very happy about this. That said, I think we should take a break for the next few months, until the Go 1.9 cycle opens up again. There's a shortage of reviewer time at the moment and I'd like everybody to focus on open bugs instead of example documentation reviews. |
Makes sense. I am going to update the list with the completed work, and move away with what's not done yet, and close the issue. We can always open a new issue with a newer up to date list during Go1.9 cycle |
For #16360. Change-Id: I99d1e5ab1f814f65b3066a498158a442f1bd477f Reviewed-on: https://go-review.googlesource.com/31137 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
Updates #16360. Change-Id: I5bf13d3367e68c5d8435f6ef2161d5a74cc747a7 Reviewed-on: https://go-review.googlesource.com/29611 Reviewed-by: Andrew Gerrand <[email protected]> Run-TryBot: Andrew Gerrand <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Updates #16360 Change-Id: I66ff23e0501363f58fe891d5e95806422071f93b Reviewed-on: https://go-review.googlesource.com/30162 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
I'd like to resume expanding the documentation with more examples. After some discussion offline and previous experiences, such 17295 and 13926, I have mapped potential packages that could use some work on example in documentation.
Also, I'd like to suggest some aspirational guidelines about how far should an example go:
1 - Examples should be able to convey the intention of the package or some subset of its interface. Or, in other terms, intention revealing package or type level examples are preferred over function level examples. Exception being, of course, functions whose functionality are entirely self-contained, e.g.
crypto/sha1.Sum
.2 - The goal for examples is to reveal intention first; to be a reusable snippet of code later second. I am not sure how to phrase this, but in the end, we do not want to promote a copy'n'paste culture out of the documentation.
3 - In the process of adding examples, perhaps add link to wiki, blog or external resources to help novices to bridge occasional lack of context.
4 - Be careful in not inducing abstraction decisions in the process of making easy examples - prefer simple examples over easy ones.
I think it is a good idea to open issues for each one of these packages, and discuss them individually. Not all of them are missing examples, but could have a more complete set.
Edit: Removed packages that have not been worked. Let's focus fixing bugs on this cycle and resume example efforts for Go1.9 cycle.
//cc: @adg
The text was updated successfully, but these errors were encountered: