-
Notifications
You must be signed in to change notification settings - Fork 95
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
Removed ListNestedAttributesOptions
, SetNestedAttributesOptions
and MapNestedAttributesOptions
types, as they were empty (no fields) and unused
#349
Conversation
…nd `MapNestedAttributesOptions` types, as they were empty (no fields) and unused. Because of this, `ListNestedAttributes`, `SetNestedAttributes` and `MapNestedAttributes` functions lost the second argument `opts`, as it was unused.
@@ -73,7 +73,7 @@ type NestedAttributes interface { | |||
type nestedAttributes map[string]Attribute | |||
|
|||
func (n nestedAttributes) GetAttributes() map[string]Attribute { | |||
return map[string]Attribute(n) | |||
return n |
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.
Goland made me do it ®
@@ -111,7 +111,7 @@ func (n nestedAttributes) AttributeType() attr.Type { | |||
// configuration. | |||
func SingleNestedAttributes(attributes map[string]Attribute) NestedAttributes { | |||
return singleNestedAttributes{ | |||
nestedAttributes(attributes), | |||
attributes, |
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.
Goland made me do it ®
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.
One minor documentation note, otherwise looks good to me 🚀
docs/design/blocks.md
Outdated
@@ -522,7 +522,7 @@ func (t exampleThingResourceType) GetSchema(_ context.Context) (Schema, diag.Dia | |||
Required: true, | |||
Type: types.StringType, | |||
}, | |||
}, ListNestedAttributesOptions{}), |
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 think we should keep the design documentation with the original context/decision here and below.
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'm ok with it, even though I can foresee someone coming here, reading the doc, and getting confused.
But we already discussed this, so 👍
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.
Reverted.
This reverts commit d0b3fec.
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. |
No description provided.