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

Method Ptr

pos.go:123–125  ·  pos.go::Range.Ptr

Ptr returns a pointer to a copy of the receiver. This is a convenience when ranges in places where pointers are required, such as in Diagnostic, but the range in question is returned from a method. Go would otherwise not allow one to take the address of a function call.

()

Source from the content-addressed store, hash-verified

121// the range in question is returned from a method. Go would otherwise not
122// allow one to take the address of a function call.
123func (r Range) Ptr() *Range {
124 return &r
125}
126
127// String returns a compact string representation of the receiver.
128// Callers should generally prefer to present a range more visually,

Callers 15

AbsTraversalForExprFunction · 0.80
ExprListFunction · 0.80
ExprMapFunction · 0.80
ExprCallFunction · 0.80
decodeBodyToStructFunction · 0.80
DecodeExpressionFunction · 0.80
ValueMethod · 0.80
ValueMethod · 0.80
ValueMethod · 0.80
ValueMethod · 0.80
ValueMethod · 0.80
ValueMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected