-
Notifications
You must be signed in to change notification settings - Fork 179
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
Is There a Difference Between Structs #322
Comments
cc @pxp928, 👀 |
@nathannaveen This file was copied over (and slightly modified) from an upstream project (now OSV Scanner). I did create another issue #323 to track that we eventually remove this from GUAC (this issue jogged my memory that I forgot to do that. Thanks for that!). Feel free to remove the redundant structs but overall the whole file will be removed in the near future once I speak with the OSV Scanner maintainers. Currently there is a comment on the file for other that view it in the future: guac/pkg/certifier/osv/internal/osv_query/osv_query.go Lines 16 to 19 in 3dd8931
|
- Refactored the file `pkg/certifier/osv/internal/osv_query/osv_query.go` - Removed redundant structs which fixes: guacsec#322 - Removed the `MakeCommitRequest` struct because it wasn't ever used - Removed the `Hydrate()` function because it isn't ever used - Also removed `Get()` because it was only used in `Hydrate()` Signed-off-by: nathannaveen <[email protected]>
Hi, I was trying to test
pkg/certifier/osv/internal/osv_query/osv_query.go
and saw that there are the structs,BatchedResponse
andHydratedBatchedResponse
:guac/pkg/certifier/osv/internal/osv_query/osv_query.go
Lines 80 to 88 in 3dd8931
HydratedBatchedResponse
only hasResults []Response `json:"results"`
in it, andBatchedResponse
hasResults []MinimalResponse `json:"results"`
in it.Response
is:And
MinimalResponse
is:So what makes
HydratedBatchedResponse
andBatchedResponse
different, is there a reason they are two different structs?The text was updated successfully, but these errors were encountered: