Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

build: exclude standalone examples from package builds - #14

Closed
hazarguney wants to merge 1 commit into
mainfrom
fix/examples-build-ignore
Closed

hazarguney wants to merge 1 commit into
mainfrom
fix/examples-build-ignore

Conversation

@hazarguney

Copy link
Copy Markdown
Member

The five files in examples/ each declare package main and func main, so ./examples does not compile: go vet, go test -cover ./... and golangci-lint all stop with main redeclared in this block. That would fail the new CI as soon as it runs on this repository.

  • Add //go:build ignore to each example so they are skipped by ./... and still run with go run examples/<file>.go.

No library code changes. go test -race ./... and go vet ./... pass, and go run examples/01_basic_operations.go still works.

@hazarguney hazarguney closed this Nov 9, 2026
@hazarguney
hazarguney deleted the fix/examples-build-ignore branch November 9, 2026 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant