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

Make code DRY: Replace AttributeTypes() by ElementType(...) ? #59

Open
davidfischer-ch opened this issue Aug 21, 2024 · 0 comments
Open
Labels
enhancement New feature or request go Pull requests that update Go code good first issue Good for newcomers Wait & See Lowest priority

Comments

@davidfischer-ch
Copy link
Owner

https://discuss.hashicorp.com/t/how-to-declare-a-jsontypes-normalizedtype-inside-attributetypes-function/69427.

Try to follow SBGoods advise.

Sorry that you’re running into trouble here. If you only need the map[string]attr.Type for type conversion to and from a types.Object framework type, you likely don’t need to implement the CustomFormModelAttributeTypes() yourself. The framework provides the ElementType(ctx) method to get the element types that you can use instead..

@davidfischer-ch davidfischer-ch added enhancement New feature or request good first issue Good for newcomers go Pull requests that update Go code Wait & See Lowest priority labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code good first issue Good for newcomers Wait & See Lowest priority
Projects
None yet
Development

No branches or pull requests

1 participant