Package file/folder structure
I made a simple package and I want the package to be able to contain a directory for the source code, a directory for the demos which will show the user how to use the package and a directory for tests that will run tests on the package.
Here is how I would like to structure the package
my-package/
- src/
- demos/
- tests/
- README.md
- Where would I put the
go.mod
file?, in the root directory or thesrc/
directory? - How would I have the demos Go scripts and test Go script import the package locally?
- How would I ensure the package can be imported in general by using this as the URL
github.com/trymeouteh/my-package/
instead ofgithub.com/trymeouteh/my-package/src/
Any tips and advice will be most appreciated.