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 {
30 for _, s := range me[1:] {
38 func (me tag) OmitEmpty() bool {
39 return me.HasOpt("omitempty")
42 func (me tag) IgnoreUnmarshalTypeError() bool {
43 return me.HasOpt("ignore_unmarshal_type_error")