microcks / microcks/microcks-cli

Cleanup: CreateTestResult payload construction and minor typo in cmd

Open Beginner friendly
#388 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
52
Forks
68
Avg merge
6h 54m
Merged PRs (30d)
10

Description

I found the code in pkg/connectors/microcks_client.go and see that the CreateTestResult function is creating the JSON body using string concatenation. A little brittle and difficult to add more fields to the test request later on.

Also, I noticed that in cmd/cmd.go, the main entry point is called NewCommad (and not NewCommand).

I'm happy to put together a PR to:

Utilise a correct struct and json.Marshal test request payload.
Correct the typo in the NewCommad package and main.go in the CLI.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pkg/connectors/microcks_client.go and inspect CreateTestResult's JSON payload construction, then check cmd/cmd.go and main.go for the NewCommad entry point. The work is complete when the test request uses a struct marshaled with json.Marshal and the CLI entry point consistently uses the corrected NewCommand name.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, cli
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.