golang custom location of main.go file
I have a custom location of main.go file, not in the repo root but in ‘./cmd/module-name’.
Build command from local env is not working. I don’t want to change default path in setting because my app is not a monolith and I need railway to watch for changes. I’ve tried defining custom build commands, but nothing seems to work as expected :
go build ./cmd/module-name
Or
go build module-name/cmd/module-name
7 Replies
Project ID:
5e913d61-2cbe-4f85-925a-ac2a79dfb950
Service id is 5e913d61-2cbe-4f85-925a-ac2a79dfb950
You can do that by setting a custom root directory on the service itself
try
go build ./...
I think they said they didn't wanna do that 🤣Damn! Guess I should read better! 🤣🤣
you'll have that