On Fri, 5 Sept 2025 at 22:14, Jason E. Aten <j.e.a...@gmail.com> wrote:
> Moreover its easy to just write a regular test. I would just write a > regular > Test func and put the word "Example" in a comment above it. > Same result, no? > No, example functions are exposed in package docs (with `go doc -http` or on pkg.go.dev) and can be run directly from the browser: https://go.dev/blog/examples I agree with you that we don't want to do it automatically, but it would be useful to have a way to do it at all. > > On Friday, September 5, 2025 at 7:19:36 PM UTC+1 Pierre Durand wrote: > >> Using synctest requires to have access to a *testing.T >> This is not available from an example testing function. >> >> Should we automatically run examples in a synctest time bubble ? >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion visit > https://groups.google.com/d/msgid/golang-nuts/a088adf2-f4f8-47eb-879b-222714670be5n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/a088adf2-f4f8-47eb-879b-222714670be5n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfHeEFxhyrYY6ezdZuAfodj%2BKYaLMz_ze6X1HT0FOWYkbA%40mail.gmail.com.