G-Node / G-Node/gin-valid

Unify results rendering

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The results rendering functions (`renderBidsResults()` and `renderNIXResults()`) still duplicate a lot of code that could be moved to the `Results()` function. We could shrink these two functions so that :
- Make the main `Results()` function parse the layout template.
- The `Results()` function could also parse the template for each validator and then we can make the `renderBidsResults()` and `renderNIXResults()` functions simply return an `interface{}` which contains the data required to execute the template.

We could go one step further and have a single template for all validation results. Each function would then have to return a byte slice of their results as text instead of having them structured. The template would then simply add the text to the body of the common template.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.