MCPcopy Index your code
hub / github.com/tinylib/msgp / CountFieldTagPart

Method CountFieldTagPart

gen/elem.go:628–636  ·  view source on GitHub ↗

CountFieldTagPart the count of HasTagPart(p) is true for any field.

(pname string)

Source from the content-addressed store, hash-verified

626
627// CountFieldTagPart the count of HasTagPart(p) is true for any field.
628func (s *Struct) CountFieldTagPart(pname string) int {
629 var n int
630 for _, sf := range s.Fields {
631 if sf.HasTagPart(pname) {
632 n++
633 }
634 }
635 return n
636}
637
638type StructField struct {
639 FieldTag string // the string inside the `msg:""` tag up to the first comma

Callers 2

mapstructMethod · 0.80
structAsMapMethod · 0.80

Calls 1

HasTagPartMethod · 0.80

Tested by

no test coverage detected