Code examples from our talks about how to structure Go code.
All these examples are for study purpose, but all the code can be compiled, so you can test it:
$ go run no-architecture/*.go
$ go run package-architecture/main.go
$ go run hexagonal-architecture/cmd/counters-api/main.go
counters-api
$ go run contexts-architecture/counters/cmd/counters-api/main.go
users-api
$ go run contexts-architecture/users/cmd/users-api/main.go