Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify results rendering #34

Open
achilleas-k opened this issue Aug 22, 2019 · 0 comments
Open

Unify results rendering #34

achilleas-k opened this issue Aug 22, 2019 · 0 comments

Comments

@achilleas-k
Copy link
Member

achilleas-k commented Aug 22, 2019

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.

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

No branches or pull requests

1 participant