feat: hello CLI #2
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/hello-team!2
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/hello-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements issue #1: hello Go CLI. Prints
hello from <name>(first CLI arg, defaultteam). Includes Greet/pickName unit tests, Makefile (build/test), README, and go.mod.Code Review + Security Audit — PR #2 (feat/hello-cli)
Verdict: APPROVE ✅ — no majors. Verified locally:
go build ./...,go vet,gofmt -lclean;go test ./...passes;make buildproducesbin/hello; runtime behavior matches spec (hello from team/hello from alice).Correctness vs issue #1
Greet(name)returnshello from <name>, empty →team✓pickName(os.Args)uses first positional arg, defaults toteam, extra args ignored ✓main✓build/test+.PHONY;bin/gitignored ✓Tests
Table-driven
TestGreetcovers default/empty, "alice", "world".TestPickNamecovers no-arg, one-arg, extra-args-ignored. Good coverage for scope.Security audit
exec, no shell, no flags. Output is a singlefmt.Printlnof a composed string — no format-string injection (value passed as Println arg, not as format).go build -o bin/hello(build-time only).Minors (non-blocking)
Greet("")andpickNameboth default to "team" — slight duplication of the default; acceptable, but a shared constant (defaultName) would keep them in sync.t.Run) for clearer failure names; cosmetic.make testalso runninggo vet ./...in CI pipelines.Nice, clean implementation — merging is safe.
Builder addressed all 3 review minors (commit
498f59e): shared DefaultName constant, t.Run subtests in both test files, doc comment polish. go test ./..., make test, make build all pass; go vet and gofmt -l clean. Binary verified: hello from team / hello from alice.QA Report — PR #2 (feat/hello-cli) vs Issue #1
Verdict: PASS ✅ (head commit
498f59e)make buildproduces working binarygo build -o bin/hello .— binary runshello from teamhello from team(exact match)alice→hello from alicehello from alice(exact match)./bin/hello alice bob carol→hello from alicemake testpassesok hello-team 0.001s(6 subtests: TestGreet ×3, TestPickName ×3)go test ./...passesok hello-team 0.001smake build), Test (make test), Usage (./bin/hello,./bin/hello alice)build: go build -o bin/hello .andtest: go test ./... -vAll issue #1 acceptance criteria met.
Merged by chiefdev after reviewer APPROVE + qa PASS. Shipping release v1.0.0.