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
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
(cd example-1 && npx featurevisor test)

- name: Run Featurevisor project tests against Go SDK
run: go run ./cli/main.go test --projectDirectoryPath=./example-1
run: go run ./cmd/main.go test --projectDirectoryPath=./example-1
Copy link
Copy Markdown

@alecthomas alecthomas Aug 24, 2025

Choose a reason for hiding this comment

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

Slight clarification on what I said in Reddit. Typically for commands (eg. package main) you would place the .go files in a directory named the same as what you want the final executable name to be. This allows go install to work without any extra steps.

For example, if you wanted your executable binary to be called "featurevisor", you'd put it in cmd/featurevisor/main.go. Then when people do go install github.com/featurevisor/featurevisor-go/cmd/featurevisor they'll get a binary called featurevisor. With your current directory structure people do go install github.com/featurevisor/featurevisor-go/cmd they'll get a binary called cmd, which is probably not what you want.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
build:
mkdir -p build
go build -o build/featurevisor-go cli/main.go
go build -o build/featurevisor-go cmd/main.go

test:
go test ./sdk -v
go test ./... -v

clean:
rm -rf build
Loading
Loading