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

Refactor and test GetDatasetDetailsPublished #66

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kavir1698
Copy link
Collaborator

No description provided.

if err != nil {
log.Fatal("Get dataset details failed:", err)
}
defer resp.Body.Close()

Copy link
Collaborator

Choose a reason for hiding this comment

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

extra tab


_ = json.Unmarshal(body, &datasetDetails)
func makeRequest(client *http.Client, APIServer string, filter string) (*http.Response, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

it feels like this makeRequest and createFilter is in many files. If they share most of the logic, would it make sense to move them in the utils file and import accordingly?

log.Printf("Dataset %s no infos found in catalog - will not be copied !\n", datasetId)
color.Unset()
}
func processDatasetDetails(resp *http.Response, datasetList []string) ([]Dataset, []string) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't this block very similar to this? If so, in a later PR, we can reuse a common function

Copy link
Member

@sbliven sbliven left a comment

Choose a reason for hiding this comment

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

Carlo's comments about code repetition can be done in a future PR imo.

@minottic
Copy link
Collaborator

@consolethinks if you have any free time, could you check and fix this PR (or close it all together if not relevant to your changes)?

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.

4 participants