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

[Investigate]: refactor types to use pointers similar to the oscal created types and lula native types #268

Open
2 tasks
mike-winberry opened this issue Jun 18, 2024 · 0 comments
Labels
triage Awaiting triage from the team

Comments

@mike-winberry
Copy link
Collaborator

mike-winberry commented Jun 18, 2024

Describe what should be investigated or refactored

I have noticed a lot of frustrations when consuming go-oscal as a library both within itself and within Lula. Many of the issues I have run into would likely be solved by not passing around instantiated "empty" structs, by replacing many of the structs with pointers, it opens it up to simple nil checks and also ensures json compatibility with go-oscal Library types and consistency with Lula and this projects own generated types

Links to any relevant code

  • extraneous check due to default (empty) struct:
    func (v *Validator) GetValidationResult() (ValidationResult, error) {
    if v.validationResult.TimeStamp == (ValidationResult{}).TimeStamp {
    return v.validationResult, errors.New("validation has not been run")
    }
    return v.validationResult, nil
    }

Additional context

catalyst for creating this issue:
Screenshot 2024-06-17 at 9 30 33 PM

  • will solve
  • wont solve created: #ISSUE_NUMBER

Add any other context or screenshots about the technical debt here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Awaiting triage from the team
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant