Skip to content

Add a Go example client for /api/analyze #158

Description

@pablocaeg

examples/ has a Python client and a Node client (examples/node_client.mjs, tested by tests/test_node_client.py). A Go one would help people calling SlopTotal from Go services.

What to do:

  • Add examples/go_client/main.go, standard library only (net/http, encoding/json). It should do what node_client.mjs does: read the text from an argument or stdin, POST it to /api/analyze on SLOPTOTAL_URL (default http://localhost:8000), and print the overall score, the verdict and the five engines with the highest scores.
  • Add tests/test_go_client.py modelled on tests/test_node_client.py: a local fake server, go run against it, and a check of the output. Skip the test when go is not installed, as the Node test does.
  • Add one line for it to the examples section of the README.

Done when: go vet ./examples/go_client is clean, the test passes with Go installed and is skipped without it.

New here? AGENTS.md is a two-minute brief and CONTRIBUTING.md covers setup. The unit tests run in seconds with no model downloads (pip install -r requirements-dev.txt && pytest -q). Comment below to take this issue.

Activity

  1. added
    help wantedExtra attention is needed
    toolingLinting, formatting and developer tooling
    beginnerFriendly for first-time contributors
    on Oct 20, 2026
  2. abinyads-dev commented on Nov 4, 2026

    @abinyads-dev

    I would like to claim this issue. I will implement examples/go_client/main.go using only the standard library (
    et/http, encoding/json), add ests/test_go_client.py modelled on ests/test_node_client.py, and update the README examples section.

  3. sloptotal-bot commented on Nov 4, 2026

    @sloptotal-bot

    Welcome, Abinaya, I've assigned #158 to you. Start by reading examples/node_client.mjs and tests/test_node_client.py so the Go client matches their behaviour and output, then add examples/go_client/main.go (stdlib only, SLOPTOTAL_URL defaulting to [link removed] text from argument or stdin) and tests/test_go_client.pywith the same skip whengois missing. Runpytest -qandruff check app tests scripts, plus go vet ./examples/go_client, and put Closes #158` in the PR description. The README line goes in the examples section near the Node client.

    If SlopTotal is useful to you, a ⭐ on the repository helps other people find it.

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

  4. abinyads-dev commented on Nov 4, 2026

    @abinyads-dev

    I have opened PR #189 implementing the Go example client (examples/go_client/main.go), regression unit tests in ests/test_go_client.py, and updated documentation in the README examples section.

    PR: #189

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

Metadata

Metadata

Assignees

Labels

beginnerFriendly for first-time contributorsgood first issueGood for newcomershacktoberfestCounts for Hacktoberfesthelp wantedExtra attention is neededtoolingLinting, formatting and developer tooling

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions