8 func getTag(st reflect.StructTag) tag {
9 return parseTag(st.Get("bencode"))
14 func parseTag(tagStr string) tag {
15 return strings.Split(tagStr, ",")
18 func (me tag) Ignore() bool {
22 func (me tag) Key() string {
26 func (me tag) HasOpt(opt string) bool {
27 for _, s := range me[1:] {
35 func (me tag) OmitEmpty() bool {
36 return me.HasOpt("omitempty")
39 func (me tag) IgnoreUnmarshalTypeError() bool {
40 return me.HasOpt("ignore_unmarshal_type_error")