"IsMain" is set if the package is called "main". Looks like there is no
On 2017-03-06 19:25,
mhh...@gmail.com wrote:
>
> thanks for your reply.
>
> yeah, that s right, ok, but what about TOC#5 ?
>
> That should work too,
>
> To achieve this we can use a "whole file example."
> A whole file example is a file that ends in |_test.go |✓
> contains exactly one example
> function, ✓
> no test or benchmark
> functions, ✓
> and at least one other package-level declaration. ✓
> When displaying such examples godoc will show the entire file.
>
> : x
>
>
https://github.com/mh-cbon/emd/blob/master/main_test.go
>
>
> On Monday, March 6, 2017 at 5:42:32 PM UTC+1, Janne Snabb wrote:
>
> Your example function is named ExampleMain(). This means that it is
> supposed to document function Main() or type Main.
>
> However, there is no function Main() or type Main in the package. Thus
> the example is not visible in the documentation because there is
> nothing
> for it to attach to.
>
> See for example the following about the naming rules:
>
>
https://blog.golang.org/examples#TOC_4
>
> --
> 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...@googlegroups.com