func (tf *TagFilter) Unmarshal(src []byte) ([]byte, error) {
	tail, k, err := encoding.UnmarshalBytes(src)
	if err != nil {
		return tail, fmt.Errorf("cannot unmarshal Key: %s", err)
	}
	tf.Key = append(tf.Key[:0], k...)
	src = tail

	tail, v, err := encoding.UnmarshalBytes(src)
	if err != nil {
		return tail, fmt.Errorf("cannot unmarshal Value: %s", err)
	}
	tf.Value = append(tf.Value[:0], v...)
	src = tail

	if len(src) < 1 {
		return src, fmt.Errorf("cannot unmarshal IsNegative+IsRegexp from empty src")
	}
	x := src[0]
	switch x {
	case 0:
		tf.IsNegative = false
		tf.IsRegexp = false
	case 1:
		tf.IsNegative = false
		tf.IsRegexp = true
	case 2:
		tf.IsNegative = true
		tf.IsRegexp = false
	case 3:
		tf.IsNegative = true
		tf.IsRegexp = true
	default:
		return src, fmt.Errorf("unexpected value for IsNegative+IsRegexp: %d; must be in the range [0..3]", x)
	}
	src = src[1:]

	return src, nil
}
// Unmarshal unmarshals tf from src and returns the tail.
Unmarshal unmarshals tf from src and returns the tail.
// Unmarshal unmarshals tf from src and returns the tail .
func (tf *TagFilter) Unmarshal(src []byte) ([]byte, error) {
	tail, k, err := encoding.UnmarshalBytes(src)
	if err != nil {
		return tail, fmt.Errorf("cannot unmarshal Key: %s", err)
	}
	tf.Key = append(tf.Key[:0], k...)
	src = tail
	tail, v, err := encoding.UnmarshalBytes(src)
	if err != nil {
		return tail, fmt.Errorf("cannot unmarshal Value: %s", err)
	}
	tf.Value = append(tf.Value[:0], v...)
	src = tail
	if len(src) < 1 {
		return src, fmt.Errorf("cannot unmarshal IsNegative+IsRegexp from empty src")
	}
	x := src[0]
	switch x {
	case 0:
		tf.IsNegative = false
		tf.IsRegexp = false
	case 1:
		tf.IsNegative = false
		tf.IsRegexp = true
	case 2:
		tf.IsNegative = true
		tf.IsRegexp = false
	case 3:
		tf.IsNegative = true
		tf.IsRegexp = true
	default:
		return src, fmt.Errorf("unexpected value for IsNegative+IsRegexp: %d; must be in the range [0..3]", x)
	}
	src = src[1:]
	return src, nil
}
func ( tf * TagFilter ) Unmarshal ( src [ ] byte ) ( [ ] byte , error ) { tail , k , err := encoding . UnmarshalBytes ( src ) if err != nil { return tail , fmt . Errorf ( " " , err ) } tf . Key = append ( tf . Key [ : 0 ] , k ... ) src = tail tail , v , err := encoding . UnmarshalBytes ( src ) if err != nil { return tail , fmt . Errorf ( " " , err ) } tf . Value = append ( tf . Value [ : 0 ] , v ... ) src = tail if len ( src ) < 1 { return src , fmt . Errorf ( " " ) } x := src [ 0 ] switch x { case 0 : tf . IsNegative = false tf . IsRegexp = false case 1 : tf . IsNegative = false tf . IsRegexp = true case 2 : tf . IsNegative = true tf . IsRegexp = false case 3 : tf . IsNegative = true tf . IsRegexp = true default : return src , fmt . Errorf ( " " , x ) } src = src [ 1 : ] return src , nil }
Unmarshal unmarshals tf from src and returns the tail.
Unmarshal unmarshals tf from src and returns the tail .