Re: [go-nuts] Usage example inside a lib project

2018-04-18 Thread matthewjuran
An example directory works too and is pretty common. Matt On Wednesday, April 18, 2018 at 7:45:45 AM UTC-5, Federico Paolinelli wrote: > > Il giorno mercoledì 18 aprile 2018 08:41:30 UTC-4, Jan Mercl ha scritto: >> >> On Wed, Apr 18, 2018 at 2:35 PM Federico Paolinelli >>

Re: [go-nuts] Usage example inside a lib project

2018-04-18 Thread Federico Paolinelli
Il giorno mercoledì 18 aprile 2018 08:41:30 UTC-4, Jan Mercl ha scritto: > > On Wed, Apr 18, 2018 at 2:35 PM Federico Paolinelli > wrote: > > See https://golang.org/pkg/testing/#hdr-Examples. Put the examples into > the foo_test.go file. > > > Oh, didn't realize that it was

Re: [go-nuts] Usage example inside a lib project

2018-04-18 Thread Jan Mercl
On Wed, Apr 18, 2018 at 2:35 PM Federico Paolinelli wrote: See https://golang.org/pkg/testing/#hdr-Examples. Put the examples into the foo_test.go file. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Usage example inside a lib project

2018-04-18 Thread Federico Paolinelli
Hi everyone, I am pretty new to golang and I have the following question. I developed a lib for internal use here at work. It has it's own package and tests inside the git repo. Now, I would like to add an example of how to use it, but if I add a package main file it will be interpreted as a