From 430749d51d10dd139992ea2d2a868a20abe45ce0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 20:48:36 +0000 Subject: [PATCH 1/3] Update golang Docker tag to v1.25.5 --- Dockerfile | 2 +- package.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 03196f7..38a727a 100755 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Stages # ----------------------------------------------------------------------------- -ARG IMAGE_BUILDER=golang:1.25.4-bookworm@sha256:e17419604b6d1f9bc245694425f0ec9b1b53685c80850900a376fb10cb0f70cb +ARG IMAGE_BUILDER=golang:1.25.5-bookworm@sha256:5117d68695f57faa6c2b3a49a6f3187ec1f66c75d5b080e4360bfe4c1ada398c ARG IMAGE_FINAL=senzing/senzingsdk-runtime:4.1.0@sha256:e57d751dc0148bb8eeafedb7accf988413f50b54a7e46f25dfe4559d240063e5 # ----------------------------------------------------------------------------- diff --git a/package.Dockerfile b/package.Dockerfile index ce1f5da..329131e 100755 --- a/package.Dockerfile +++ b/package.Dockerfile @@ -2,7 +2,7 @@ # Stages # ----------------------------------------------------------------------------- -ARG IMAGE_BUILDER=golang:1.25.4-bookworm@sha256:e17419604b6d1f9bc245694425f0ec9b1b53685c80850900a376fb10cb0f70cb +ARG IMAGE_BUILDER=golang:1.25.5-bookworm@sha256:5117d68695f57faa6c2b3a49a6f3187ec1f66c75d5b080e4360bfe4c1ada398c ARG IMAGE_FPM=dockter/fpm:1.1.0@sha256:a92ac598d35f1a7a4a659e26bd0e1bd25f317aafdcd4be8bf2795314c421d89b ARG IMAGE_FINAL=alpine@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412 From 818e23bee1ae60a8a19541f6dd3649f9f065cf1b Mon Sep 17 00:00:00 2001 From: docktermj Date: Wed, 3 Dec 2025 09:52:03 -0500 Subject: [PATCH 2/3] Update dependencies --- .claude/CLAUDE.md | 64 +++++++++++++++++++++++++++++++++ .claude/commands/code-review.md | 3 ++ go.mod | 8 ++--- go.sum | 16 ++++----- 4 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 .claude/CLAUDE.md create mode 100644 .claude/commands/code-review.md diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md new file mode 100644 index 0000000..eda0118 --- /dev/null +++ b/.claude/CLAUDE.md @@ -0,0 +1,64 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +`observe` is a Go command-line tool that receives Observer messages over gRPC. It's part of the [senzing-tools](https://github.com/senzing-garage/senzing-tools) suite. + +## Common Commands + +### Build +```bash +make clean build # Build binary for current platform +make build-all # Build for all platforms (darwin/linux/windows, amd64/arm64) +``` +Binaries output to `target/-/observe` + +### Test +```bash +make clean setup test # Run all tests +go test -v ./... # Run tests directly +go test -v -run TestName ./path/to/package # Run single test +``` + +### Lint +```bash +make lint # Run golangci-lint, govulncheck, and cspell +make golangci-lint # Run only golangci-lint +make fix # Auto-fix lint issues where possible +``` + +### Other +```bash +make dependencies # Update Go dependencies +make dependencies-for-development # Install dev tools (golangci-lint, godoc, etc.) +make coverage # Run tests with coverage report +make docker-build # Build Docker image +go run main.go # Run directly +``` + +## Architecture + +- `main.go` - Entry point, calls `cmd.Execute()` +- `cmd/` - Cobra command setup + - `root.go` - Main command definition, starts gRPC server + - `context_*.go` - Platform-specific context variables (linux/darwin/windows) + - `github.go` - Version info from GitHub +- `observer/` - Core observer implementation + - `observer_simple.go` - `SimpleObserver` struct that runs gRPC server using `go-observing` library + +The tool creates a gRPC server that: +1. Creates a Subject (`go-observing/subject.SimpleSubject`) +2. Registers a `RawObserver` with the subject +3. Serves via `grpcserver.SimpleGrpcServer` + +## Key Dependencies + +- `github.com/senzing-garage/go-cmdhelping` - Command-line helpers for Cobra/Viper +- `github.com/senzing-garage/go-observing` - Observer pattern implementation with gRPC +- `github.com/spf13/cobra` and `github.com/spf13/viper` - CLI framework + +## Linting Configuration + +Uses golangci-lint with extensive linters enabled. Config at `.github/linters/.golangci.yaml`. Line length limit is 120 characters. diff --git a/.claude/commands/code-review.md b/.claude/commands/code-review.md new file mode 100644 index 0000000..7645f4a --- /dev/null +++ b/.claude/commands/code-review.md @@ -0,0 +1,3 @@ +# Senzing code review + +Perform the code review specified by diff --git a/go.mod b/go.mod index ae568a3..8a92bd2 100644 --- a/go.mod +++ b/go.mod @@ -27,10 +27,10 @@ require ( github.com/spf13/pflag v1.0.10 // indirect github.com/subosito/gotenv v1.6.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/net v0.46.1-0.20251013234738-63d1a5100f82 // indirect - golang.org/x/sys v0.37.0 // indirect - golang.org/x/text v0.30.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect + golang.org/x/net v0.47.0 // indirect + golang.org/x/sys v0.38.0 // indirect + golang.org/x/text v0.31.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect google.golang.org/protobuf v1.36.10 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 0cb1f5c..12c95b8 100644 --- a/go.sum +++ b/go.sum @@ -72,16 +72,16 @@ go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJr go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/net v0.46.1-0.20251013234738-63d1a5100f82 h1:6/3JGEh1C88g7m+qzzTbl3A0FtsLguXieqofVLU/JAo= -golang.org/x/net v0.46.1-0.20251013234738-63d1a5100f82/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= -golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= -golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= -golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 h1:M1rk8KBnUsBDg1oPGHNCxG4vc1f49epmTO7xscSajMk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM= google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig= google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= From 122b79316d806a3215dceae336b2cea98da7a28b Mon Sep 17 00:00:00 2001 From: docktermj Date: Wed, 3 Dec 2025 09:56:22 -0500 Subject: [PATCH 3/3] Update dependencies --- .claude/CLAUDE.md | 6 ++++++ .vscode/cspell.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index eda0118..1435ed3 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -9,13 +9,16 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Common Commands ### Build + ```bash make clean build # Build binary for current platform make build-all # Build for all platforms (darwin/linux/windows, amd64/arm64) ``` + Binaries output to `target/-/observe` ### Test + ```bash make clean setup test # Run all tests go test -v ./... # Run tests directly @@ -23,6 +26,7 @@ go test -v -run TestName ./path/to/package # Run single test ``` ### Lint + ```bash make lint # Run golangci-lint, govulncheck, and cspell make golangci-lint # Run only golangci-lint @@ -30,6 +34,7 @@ make fix # Auto-fix lint issues where possible ``` ### Other + ```bash make dependencies # Update Go dependencies make dependencies-for-development # Install dev tools (golangci-lint, godoc, etc.) @@ -49,6 +54,7 @@ go run main.go # Run directly - `observer_simple.go` - `SimpleObserver` struct that runs gRPC server using `go-observing` library The tool creates a gRPC server that: + 1. Creates a Subject (`go-observing/subject.SimpleSubject`) 2. Registers a `RawObserver` with the subject 3. Serves via `grpcserver.SimpleGrpcServer` diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 5a0de9f..b122967 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -27,6 +27,7 @@ "gotestfmt", "gotesttools", "govulncheck", + "grpcserver", "ICLA", "LDFLAGS", "OSARCH", @@ -75,4 +76,4 @@ "bearer.ignore", "Makefile" ] -} \ No newline at end of file +}