go-playground
go-playground copied to clipboard
Add support for multiple files and packages accessible via tabs
It would be helpful and useful if a user could open multiple files and access them via tabs.
This would make examples involving or affected by file structure easy to show.
It would make showing both the code and the tests much closer to the user experience with a Go compiler.
It would make creating examples where on package imports another much easier to make, understand, and explain.
Obviously, there is support for multiple files now (see https://goplay.tools/snippet/GBMO9HKN3hZ) but I find it unintuitive. In my opinion, it also degrades the explanatory power of any example with anything that has files longer than a few lines.
Tabs would make it more clear that there are separate files. What they are. Where they are. etc.
Also having a new tab/file button near the top that conforms to long establish UI standards would make the functionality self explanatory.