this post was submitted on 27 Jun 2023
20 points (91.7% liked)

Golang

2197 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 1 year ago
MODERATORS
top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 1 year ago

There's also Testable Examples in Go from the official Go blog.

[–] [email protected] 4 points 1 year ago (3 children)

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?

[–] [email protected] 2 points 1 year ago

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).

[–] RandomDevOpsDude 2 points 1 year ago

ExampleEcho

going to

func Echo doc Example

(and many more)

[–] austin 1 points 1 year ago

The go stdlib uses it a lot. For example, the strings package