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

Golang

2232 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

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

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

[–] [email protected] 4 points 2 years 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 2 years 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 2 years ago

ExampleEcho

going to

func Echo doc Example

(and many more)

[–] austin 1 points 2 years ago

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