Move the package into src/
Thirty-seven entries in the root, most of them .go files. The assets had to come along: //go:embed cannot reach outside its own directory, so templates/, static/ and migrations/ live beside the code that embeds them, and testdata/ beside the test that reads it. storage/ stays put — runtime data, not source. go build now needs -o. Without it the output would be named after the package directory and collide with src/ itself.
This commit is contained in:
@@ -16,8 +16,10 @@ vet:
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
# -o is required, not stylistic: the package lives in ./src, and without it `go build` would try to
|
||||
# write a binary named "src" over the directory.
|
||||
build:
|
||||
go build -o levyraati26-go .
|
||||
go build -o levyraati26-go ./src
|
||||
|
||||
# Templates and migrations are embedded, so seeing a change means rebuilding.
|
||||
run: build
|
||||
|
||||
Reference in New Issue
Block a user