Skip to content

Add a Go example client for /api/analyze - #189

Open
abinyads-dev wants to merge 1 commit into
pablocaeg:masterfrom
abinyads-dev:feat/go-example-client-158
Open

abinyads-dev wants to merge 1 commit into
pablocaeg:masterfrom
abinyads-dev:feat/go-example-client-158

Conversation

@abinyads-dev

Copy link
Copy Markdown

Summary

Closes #158.

Adds a Go example client for /api/analyze using only the Go standard library (
et/http, encoding/json), along with unit tests modelled on ests/test_node_client.py and documentation in the README examples section.

Type

  • New feature
  • Documentation

Changes

  • examples/go_client/main.go: Go client that reads text from command line arguments or stdin, posts JSON to /api/analyze on SLOPTOTAL_URL (or --base, defaulting to http://localhost:8000), and prints the overall score, verdict, and the top five engines by score.
  • ests/test_go_client.py: Unit tests running a local fake HTTP server verifying overall and top-five engine formatting (both --base before and after text argument) as well as piped stdin support. Skips cleanly when go is not installed.
  • README.md: Added usage example in the examples section.

Testing

  • Unit tests pass (pytest -q tests/test_go_client.py)
  • python scripts/smoke_test.py passes against a running server
  • Manual testing performed
  • Before/after numbers from ests/eval/ on both corpora -- engine or scoring changes only

Checklist

  • Code follows project style (
    uff check passes)
  • ENGINE_WEIGHTS still sum to 1.0 (if engines changed)
  • API response shapes unchanged (or extension verified)
  • No secrets or credentials committed
  • Self-review performed

Signed-off-by: Abinaya DS <abinyads@gmail.com>
@sloptotal-bot

sloptotal-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

Thanks for your first contribution to SlopTotal, Abinaya! 🎉

@pablocaeg reviews every pull request personally, and you'll hear back in this thread.

  • Because this is your first pull request here, GitHub waits for the maintainer to approve the CI run before it starts. That's a GitHub safeguard, not a problem with your change.
  • It's linked to Add a Go example client for /api/analyze #158, which will close when this is merged.
  • To check locally what CI runs: pytest -q and ruff check app tests scripts && ruff format --check app tests scripts.

Automated reply from the SlopTotal assistant. @pablocaeg reads every thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a Go example client for /api/analyze

1 participant