Go compiler; go run commnad

The main package does not “consolidate” the files into a single package as it is done for other packages.

You want to either have all the code in a single file, or create a proper project and move the handler and routes to another package that you then import from the main package.

1 Like