bold-commerce / go-shopify

Go client for the Shopify API
MIT License
328 stars 255 forks source link

Add omitempty tags asset #164

Closed s-norris closed 1 year ago

s-norris commented 3 years ago

sending tags with empty values prevents shopify from creating the asset / image correctly when using the src attribute. Shopify returns a happy response with a public_url but with a size of 0. When trying to access it on the public_url you get the error 'Transformation failed'

codecov[bot] commented 3 years ago

Codecov Report

Patch coverage has no change and project coverage change: +0.69 :tada:

Comparison is base (a69af7e) 99.30% compared to head (5be2f1d) 100.00%.

:exclamation: Current head 5be2f1d differs from pull request most recent head 2c87b9f. Consider uploading reports for the commit 2c87b9f to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #164 +/- ## =========================================== + Coverage 99.30% 100.00% +0.69% =========================================== Files 38 37 -1 Lines 1574 1255 -319 =========================================== - Hits 1563 1255 -308 + Misses 10 0 -10 + Partials 1 0 -1 ``` | [Impacted Files](https://codecov.io/gh/bold-commerce/go-shopify/pull/164?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bold+Commerce) | Coverage Δ | | |---|---|---| | [asset.go](https://codecov.io/gh/bold-commerce/go-shopify/pull/164?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bold+Commerce#diff-YXNzZXQuZ28=) | `100.00% <ø> (ø)` | | | [product.go](https://codecov.io/gh/bold-commerce/go-shopify/pull/164?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bold+Commerce#diff-cHJvZHVjdC5nbw==) | `100.00% <ø> (ø)` | | ... and [36 files with indirect coverage changes](https://codecov.io/gh/bold-commerce/go-shopify/pull/164/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bold+Commerce) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bold+Commerce). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bold+Commerce)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

oliver006 commented 1 year ago

Sorry, I'm only getting to the older PRs in this repo now.

So if src is used then the rest of the struct needs to be ignored and not get send, and vice versa? Do I understand this right?

oliver006 commented 1 year ago

And can you please address the merge issue (duplicate Status in product.go)? Thanks!