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

Consider Updating Code and Documentation for Go 1.18 any -> interface{} Alias #834

Closed
bflad opened this issue Dec 15, 2021 · 1 comment · Fixed by #1029
Closed

Consider Updating Code and Documentation for Go 1.18 any -> interface{} Alias #834

bflad opened this issue Dec 15, 2021 · 1 comment · Fixed by #1029
Assignees
Labels
documentation Improvements or additions to documentation technical-debt
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Dec 15, 2021

SDK version

v2.10.0

Use-cases

This framework generally requires heavy usage of empty interface types (interface{}, []interface{}, map[string]interface{}) when working with helper/schema.ResourceData. This syntax is a little verbose and is not intuitive for newer provider developers or Gophers coming from projects which typically use concrete types.

When Go 1.18 releases early next year, it will include the equivalent of:

type any = interface{}

It seems like it would be great to update our code and examples to replace interface{} with any.

Proposal

After Go 1.18 is released:

Since this framework must remain compatible with Go 1.17 until Go 1.19 is released later next year due to our compatibility promises, this codebase should not be updated yet.

References

@bflad bflad added documentation Improvements or additions to documentation technical-debt proposal labels Dec 15, 2021
@bflad bflad changed the title Consider Updating Code Documentation for Go 1.18 any -> interface{} Alias Consider Updating Code and Documentation for Go 1.18 any -> interface{} Alias Apr 14, 2022
@bflad bflad removed the proposal label Aug 10, 2022
@bflad bflad self-assigned this Aug 11, 2022
@bflad bflad added this to the v2.21.0 milestone Aug 11, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Sep 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation technical-debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant