Skip to content

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

@bflad

Description

@bflad

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions