austin@programming.devM to Golang@programming.devEnglish · 2 年前Go’s best-kept secret: executable examplesbitfieldconsulting.comexternal-linkmessage-square5linkfedilinkarrow-up122arrow-down12
arrow-up120arrow-down1external-linkGo’s best-kept secret: executable examplesbitfieldconsulting.comaustin@programming.devM to Golang@programming.devEnglish · 2 年前message-square5linkfedilink
minus-squaremorgen@infosec.publinkfedilinkEnglisharrow-up4·2 年前I have not seen this before. Thanks for sharing. Do you know any projects that utilize this, so I can see an example implementation of this?
minus-squareOliver Lowe@lemmy.sdf.orglinkfedilinkEnglisharrow-up2·2 年前 Do you know any projects that utilize this, so I can see an example implementation of this? The sort package in the standard library uses testable examples (source code).
minus-squareRandomDevOpsDude@programming.devMlinkfedilinkEnglisharrow-up2·2 年前ExampleEcho going to func Echo doc Example (and many more)
minus-squareaustin@programming.devOPMlinkfedilinkEnglisharrow-up1·2 年前The go stdlib uses it a lot. For example, the strings package
I have not seen this before. Thanks for sharing. Do you know any projects that utilize this, so I can see an example implementation of this?
The sort package in the standard library uses testable examples (source code).
ExampleEcho
going to
func Echo
doc Example(and many more)
The go stdlib uses it a lot. For example, the strings package