MCPcopy
hub / github.com/MadAppGang/dingo / StructFieldPattern

Struct StructFieldPattern

pkg/ast/pattern.go:140–145  ·  view source on GitHub ↗

StructFieldPattern represents struct field pattern: {x, y: newName} Used in struct destructuring

Source from the content-addressed store, hash-verified

138// StructFieldPattern represents struct field pattern: {x, y: newName}
139// Used in struct destructuring
140type StructFieldPattern struct {
141 Field string // Field name
142 FieldPos token.Pos // Position of field name
143 Colon token.Pos // Position of ':' (zero if shorthand)
144 Pattern Pattern // Pattern for field value (nil if shorthand)
145}
146
147func (p *StructFieldPattern) PatternNode() {}
148func (p *StructFieldPattern) Pos() token.Pos {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected