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.

Assessment

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

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.

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.

Dominant language
Go
Stars
52
Forks
67
Avg merge
1d 1h
Merged PRs (30d)
13

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.

More from microcks/microcks-cli

All issues in microcks/microcks-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.