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 primitive types. #29

Merged
merged 1 commit into from
Jun 1, 2021
Merged

Add primitive types. #29

merged 1 commit into from
Jun 1, 2021

Conversation

paddycarver
Copy link
Contributor

This adds to #28 by creating implementations of the attr.Type interface for our primitive types: bools, numbers, and strings.

This is likewise a split of code originally written for #11 that is being split out into its own PR for easier review. (Or, at least, review will be easier when #28 is merged, which should happen before this is merged.)

@paddycarver paddycarver added the enhancement New feature or request label May 31, 2021
@paddycarver paddycarver added this to the v0.1.0 milestone May 31, 2021
@paddycarver paddycarver requested review from bflad and kmoe May 31, 2021 08:39
@paddycarver paddycarver force-pushed the paddy_types_primitives branch from 31969ca to 3749993 Compare May 31, 2021 08:41
@paddycarver
Copy link
Contributor Author

These tests rely on hashicorp/terraform-plugin-go#85, which fixes unmarshaling into uninstantiated *big.Floats.


// testAttributeType is a dummy attribute type to compare against with Equal to
// make sure we can handle unexpected types being passed in.
type testAttributeType struct{}
Copy link
Member

Choose a reason for hiding this comment

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

v nice 👍

Copy link
Member

@kmoe kmoe left a comment

Choose a reason for hiding this comment

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

delightful, especially the tests

This adds to #28 by creating implementations of the attr.Type interface
for our primitive types: bools, numbers, and strings.
@paddycarver paddycarver force-pushed the paddy_types_primitives branch from 99d63f3 to cdc6765 Compare June 1, 2021 17:17
@paddycarver paddycarver merged commit 854b99b into main Jun 1, 2021
@paddycarver paddycarver deleted the paddy_types_primitives branch June 1, 2021 17:20
@github-actions
Copy link

github-actions bot commented Jul 2, 2021

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants