-
Notifications
You must be signed in to change notification settings - Fork 156
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
[WIP]Feature/fix width/height data type #195
[WIP]Feature/fix width/height data type #195
Conversation
69ed203
to
1b256b3
Compare
integration/screenboards_test.go
Outdated
Height: datadog.Int(600), | ||
Width: datadog.Int(800), | ||
Height: datadog.JsonNumber("600"), | ||
Width: datadog.JsonNumber("800"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to #194, this code will fail downstream during marshalling, right before sending the payload to the client. Try setting Width: datadog.JsonNumber("100%"),
here to expose the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for review.
Fixed it.
12ec6cf
to
bc494cb
Compare
"fmt" | ||
) | ||
|
||
// WidthS ... | ||
type WidthS string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using PrecisionT
from #194?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#194 isn't merged yet.
And using PrecisionT
as width
or height
several difficulty for user to consider its meaning.
If used same struct in whole this package, i think shoud be better assign general name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you comment on #194 asking for a more generic name? I believe this will be merged more easily if you make it rely on existing code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#194 was merged, you could change the name of the custom type in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i split PR at #198 .
After merge, i rebase this pr.
bc494cb
to
cdd39ee
Compare
Fixes https://github.com/terraform-providers/terraform-provider-datadog/pull/118
width
param takes int & string like100%
height
param also can be int or string