Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

vars:
APP_NAME: Log2CSV
SRC_DIR: cmd/log2csv
SRC_DIR: .

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Changing SRC_DIR to repository root affects all tooling scopes; verify repo now has a single main at root.

This routes tidy/deps/fmt/vet/test/build to run at ".", which is fine if the module root now contains exactly one package main and no additional mains under subfolders. Please confirm:

  • go build ./. yields a single binary (no “multiple packages” error).
  • go test -race ./... from root is intended (it will traverse all packages under the module).

Given your earlier preference to keep tasks anchored to SRC_DIR (not the repo root) for flexibility, consider decoupling “module root” from “main package path” to keep future moves frictionless. Example below.

We used your saved preference from prior PR feedback.

 vars:
   APP_NAME: Log2CSV
-  SRC_DIR: .
+  SRC_DIR: .            # module root
+  MAIN_PKG: .           # path to the main package (can later be 'cmd/log2csv', etc.)
@@
   build:
@@
-      - go build -trimpath -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.BIN_NAME}} ./{{.SRC_DIR}}
+      - go build -trimpath -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.BIN_NAME}} {{.MAIN_PKG}}
@@
   test:
@@
-      - go test -race ./...
+      - go test -race ./...
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
SRC_DIR: .
vars:
APP_NAME: Log2CSV
SRC_DIR: . # module root
MAIN_PKG: . # path to the main package (can later be 'cmd/log2csv', etc.)
build:
commands:
- go build -trimpath -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.BIN_NAME}} {{.MAIN_PKG}}
test:
commands:
- go test -race ./...

BUILD_DIR: build
BIN_NAME: log2csv{{if eq .OS "windows"}}.exe{{end}}
CGO_ENABLED: "0"
Expand Down
Loading