组织和测试围棋项目

I have been working on a multi-packages project in Go: my project involves several packages for each data structures or algorithms - https://github.com/arnauddri/algorithms

Each package can be tested separately and works fine. I can call any of the package in any other one.

At this stage I have several questions:

  • is there a way to 'unite' the packages like there is with node, binding all the module under a unique name? Here I would be looking to add a main.go file defining a package 'algo' and I could use any of the underlying packages with algo.heap, algo.queue, algo.stack...

  • every one of my package has tests and they work fine, however everytime I change a data structure for example, I check in every other package using this one that my tests still pass and that I havent broken anything. How can I make go test work from my root file to launch all the tests?

Any other feedback on my package layout is more than welcome and appreciated :)

Many thanks

There is no language feature that will unite packages.

You can call go test ./... to run all of your tests from your project root.