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

gohcl: Fix docs about supported types for blocks. #507

Merged
merged 1 commit into from Mar 7, 2022
Merged

gohcl: Fix docs about supported types for blocks. #507

merged 1 commit into from Mar 7, 2022

Conversation

jmalloc
Copy link
Contributor

@jmalloc jmalloc commented Jan 20, 2022

This commit fixes a clause in the gohcl package documentation which incorrectly states that HCL blocks could be decoded into hcl.Body and hcl.Block types.

It also removes some code paths in decodeBlockToValue() that appeared to handled these cases. In practice, these paths were unreachable anyway due to various reflection-based type checks made before decodeBlockToValue() is
called.

/cc @apparentlymart
Fixes #505

@hashicorp-cla
Copy link

hashicorp-cla commented Jan 20, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@alisdair alisdair left a comment

Choose a reason for hiding this comment

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

Thanks @jmalloc, this looks good to me!

I notice that your commit is marked "Unverified". If you'd like to replace that with a signed commit before merging, let me know. Otherwise I'll merge this PR in a day or two.

This commit fixes a clause in the `gohcl` package documentation which incorrectly
states that HCL blocks could be decoded into `hcl.Body` and `hcl.Block` types.

It also removes some code paths in `decodeBlockToValue()` that _appeared_ to
handled these cases. In practice, these paths were unreachable anyway due to
various reflection-based type checks made before `decodeBlockToValue()` is
called.
@jmalloc
Copy link
Contributor Author

jmalloc commented Mar 6, 2022

Thanks! I've replaced this commit with a signed commit.

@alisdair alisdair merged commit 0d9c1da into hashicorp:main Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gohcl: Unable to decode block to *hcl.Block field.
3 participants