MCPcopy
hub / github.com/hashicorp/hcl / JustAttributes

Method JustAttributes

structure.go:69–69  ·  view source on GitHub ↗

JustAttributes attempts to interpret all of the contents of the body as attributes, allowing for the contents to be accessed without a priori knowledge of the structure. The behavior of this method depends on the body's source language. Some languages, like JSON, can't distinguish between attribute

()

Source from the content-addressed store, hash-verified

67 // Diagnostics may be produced for other reasons too, such as duplicate
68 // declarations of the same attribute.
69 JustAttributes() (Attributes, Diagnostics)
70
71 // MissingItemRange returns a range that represents where a missing item
72 // might hypothetically be inserted. This is used when producing

Callers 15

decodeBodyToStructFunction · 0.95
JustAttributesMethod · 0.65
TestDecodeBodyFunction · 0.65
decodeBodyToMapFunction · 0.65
TestBodyJustAttributesFunction · 0.65
TestRoundTripFormatFunction · 0.65
decodeSpecDeclsFunction · 0.65
parseVarsBodyFunction · 0.65
JustAttributesMethod · 0.65
JustAttributesMethod · 0.65
JustAttributesMethod · 0.65
JustAttributesMethod · 0.65

Implementers 8

Bodyhclsyntax/structure.go
unknownBodyext/dynblock/unknown_body.go
expandBodyext/dynblock/expand_body.go
deepWrapperext/transform/transform.go
diagBodyext/transform/error.go
bodyjson/structure.go
mockBodyhcltest/mock.go

Calls

no outgoing calls

Tested by 11

TestDecodeBodyFunction · 0.52
TestBodyJustAttributesFunction · 0.52
TestRoundTripFormatFunction · 0.52
TestTerraformLikeFunction · 0.52
TestJustAttributesFunction · 0.52
TestExpressionVariablesFunction · 0.52
TestExpression_ValueFunction · 0.52
TestParseTemplateFunction · 0.52
TestParseTemplateUnwrapFunction · 0.52
TestParseWithStartPosFunction · 0.52