#How to run application in Standard Go Project Layout

5 messages · Page 1 of 1 (latest)

twin panther
#

Do you just use go run cmd/myapp/*.go?

jovial kayak
#

if you want to run a package by their package name, you need to prefix it with the module name.

#

example go run -v local.pc/myproject/cmd/myapp

#

or you can run it by its relative path
go run ./cmd/myapp