Initialize the workspace In the workspace directory, run:
$ go work init ./hello
go.work -> use ./hello The use directive tells Go that the module in the hello directory should be main modules when doing a build.
In the workspace directory, run: $ go run ./hello olleH