Update dependencies, add tests, CI workflows, and CLAUDE.md#22
Merged
Conversation
- Update Go from 1.17 to 1.25 and all dependencies to latest versions - Replace deprecated ioutil.ReadFile with os.ReadFile - Update Dockerfile to golang:1.25-alpine - Fix flag.Parse() in config init() to work with go test - Add unit tests for config, nginx, and clickhouse packages (19 tests) - Add GitHub Actions workflow to run tests on PRs - Add GitHub Actions workflow to create releases on PR merge to master - Add CLAUDE.md with project documentation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace mintance/go-clickhouse with ClickHouse/clickhouse-go/v2 (native TCP)
- Refactor all packages per Google Go Style Guide:
- Add package and function doc comments (godoc format)
- Fix naming: Db→DB, GetParser→NewParser, interface{}→any
- Extract config inline structs into named types
- Fix import grouping: stdlib, third-party, project
- Lowercase error strings, add field context to error logs
- Replace panic with graceful error handling in ParseLogs
- Use maps.Keys/slices.Collect/strings.Join over reflect/custom helpers
- Use errors.Is for EOF comparison
- Reduce lock contention: copy log slice before I/O in flush loop
- Add integration tests with real ClickHouse (build tag: integration)
- Update CI workflow with ClickHouse service container for integration tests
- Update config-sample.yml default port to 9000 (native TCP)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rewrite README with current project state: Go 1.25, native TCP, official clickhouse-go/v2, Prometheus metrics, env var table - Remove outdated badges (Docker build status, golang 1.5+) - Add structured sections: features, quick start, config reference, NGINX/ClickHouse setup, metrics, Grafana - Add CONTRIBUTING.md with dev setup, code style guide, PR process Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README: add Go Reference, Go Report Card, CI, Docker Pulls, share buttons (X, Reddit); add How It Works section; link to config-sample.yml; reference grafana/ folder; move dev setup details to CONTRIBUTING - CONTRIBUTING: add Make targets table, project structure, full code style guide, modernized build commands - Makefile: remove legacy glide/gometalinter targets; add lint, test, test-integration targets - Dockerfile: use go mod download for layer caching, remove make dependency - Move Grafana dashboard and screenshot to grafana/ folder - Remove legacy glide.yaml and glide.lock Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Recent ClickHouse images generate a random password for the default user. Set CLICKHOUSE_PASSWORD="" on the service container to allow passwordless access. Also make integration test helpers read all credentials from env vars (user, password, host, port) via a shared testConnOpts helper to avoid hardcoded auth in multiple places. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build and push multi-arch (amd64, arm64) Docker images on PR merge. Tags both version-specific and latest. Requires DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secrets configured in the repository. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lowercase error strings, no panic in library code
Breaking Changes