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

Add export option #292

Merged
merged 1 commit into from
Jun 11, 2018
Merged

Conversation

redhatrises
Copy link
Collaborator

@codecov
Copy link

codecov bot commented Jun 11, 2018

Codecov Report

Merging #292 into master will decrease coverage by 7.24%.
The diff coverage is 61.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #292      +/-   ##
==========================================
- Coverage   86.75%   79.51%   -7.25%     
==========================================
  Files          32       38       +6     
  Lines        1012     1411     +399     
==========================================
+ Hits          878     1122     +244     
- Misses        116      239     +123     
- Partials       18       50      +32
Impacted Files Coverage Δ
pkg/lib/certifications/certification.go 40.9% <0%> (-59.1%) ⬇️
pkg/lib/standards.go 63.33% <0%> (-4.53%) ⬇️
...lib/certifications/versions/1_0_0/certification.go 60.86% <0%> (-39.14%) ⬇️
pkg/cli/export/export.go 0% <0%> (ø)
pkg/cli/export/exportFormat.go 62.5% <62.5%> (ø)
pkg/cli/export/export_outputFormat.go 64.28% <64.28%> (ø)
pkg/cli/export/export_utility.go 68% <68%> (ø)
pkg/cli/export/export_config.go 72.09% <72.09%> (ø)
pkg/cli/export/export_flatten.go 82.78% <82.78%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57dff90...e937da2. Read the comment docs.

@shawndwells
Copy link
Member

@redhatrises #291 forced a rebase of this

}
buffer.WriteString(string(bytesJSON))

// iterate over components
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

components and standard iterations are very similar. Could this be condensed into a for each loop?

e.g.

    arrayOpenControl := [2]string{"components", "standards"}

    for index,element := range arrayOpenControl{
        if len(p.element) > 0 {
           .... do stuff
        }     
    }   
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawndwells this actually would probably be a separate function as it deals with more than just strings.
I was hoping to avoid code cleanup in these type of PRs because of how big they are.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in #295

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Thanks for opening the ticket to track.

@shawndwells shawndwells merged commit 97dfc06 into opencontrol:master Jun 11, 2018
@redhatrises redhatrises deleted the export_option branch June 11, 2018 20:27
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

Successfully merging this pull request may close these issues.

None yet

2 participants