MCPcopy
hub / github.com/tinylib/msgp / HasTagPart

Method HasTagPart

gen/elem.go:648–653  ·  view source on GitHub ↗

HasTagPart returns true if the specified tag part (option) is present.

(pname string)

Source from the content-addressed store, hash-verified

646
647// HasTagPart returns true if the specified tag part (option) is present.
648func (sf *StructField) HasTagPart(pname string) bool {
649 if len(sf.FieldTagParts) < 2 {
650 return false
651 }
652 return slices.Contains(sf.FieldTagParts[1:], pname)
653}
654
655// GetTagValue returns the value for a tag part with the format "key=value".
656// Returns the value string and true if found, empty string and false if not found.

Callers 10

AnyHasTagPartMethod · 0.80
CountFieldTagPartMethod · 0.80
tupleMethod · 0.80
mapstructMethod · 0.80
tupleMethod · 0.80
mapstructMethod · 0.80
tupleMethod · 0.80
structmapMethod · 0.80
structAsTupleMethod · 0.80
structAsMapMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected