code: func (dec *Decoder) findStructField() error {
  	var anon reflect.Value
  
  	num := dec.curr.NumField()
  	for i := 0; i < num; i++ {
  		field := dec.curr.Type().Field(i)
  
  		if field.Name == dec.field {
  			tag := field.Tag.Get(dec.opts.TagName)
  			if tag == "-" {
  				// skip this field
  				return nil
  			}
  			// check if the field's name is equal
  			dec.curr = dec.curr.Field(i)
  			return nil
  		} else if field.Anonymous {
  			// if the field is a anonymous struct, then iterate over its fields
  			tmp := dec.curr
  			dec.curr = dec.curr.FieldByIndex(field.Index)
  			if dec.curr.Kind() == reflect.Ptr {
  				if dec.curr.IsNil() {
  					dec.curr.Set(reflect.New(dec.curr.Type().Elem()))
  				}
  				dec.curr = dec.curr.Elem()
  			}
  			if err := dec.findStructField(); err != nil {
  				dec.curr = tmp
  				continue
  			}
  			// field in anonymous struct is found,
  			// but first it should found the field in the rest of struct
  			// (a field with same name in the current struct should have preference over anonymous struct)
  			anon = dec.curr
  			dec.curr = tmp
  		} else if dec.field == getTagName(field.Tag, dec.opts.TagName) {
  			// is not found yet, then retry by its tag name "formam"
  			dec.curr = dec.curr.Field(i)
  			return nil
  		}
  	}
  	if anon.IsValid() {
  		dec.curr = anon
  		return nil
  	}
  
  	if dec.opts.IgnoreUnknownKeys {
  		return nil
  	}
  	return newError("could not find the field %q in the path %q", dec.field, dec.path)
  }
docs: // findStructField finds a field by its name, if it is not found,
  // then retry the search examining the tag "formam" of every field of struct