code: func updateNodeField(src interface{}, targetName string, target interface{}) interface{} {
  	var isPtr bool
  	srcVal := reflect.ValueOf(src)
  	// verify condition
  	if srcVal.Kind() == reflect.Ptr {
  		isPtr = true
  		srcVal = srcVal.Elem()
  	}
  	targetVal := reflect.ValueOf(target)
  	if srcVal.Kind() != reflect.Struct {
  		return src
  	}
  	srcFieldValue := srcVal.FieldByName(targetName)
  	if !srcFieldValue.IsValid() || srcFieldValue.Kind() != targetVal.Kind() {
  		return src
  	}
  
  	if srcFieldValue.CanSet() {
  		if srcFieldValue.Kind() == reflect.Slice {
  			items := reflect.MakeSlice(srcFieldValue.Type(), targetVal.Len(), targetVal.Len())
  			for index := 0; index < items.Len(); index++ {
  				tmp := targetVal.Index(index).Interface()
  				items.Index(index).Set(reflect.ValueOf(tmp))
  			}
  			srcFieldValue.Set(items)
  		} else {
  			srcFieldValue.Set(targetVal)
  		}
  	}
  	if isPtr {
  		return srcVal.Addr().Interface()
  	}
  	return srcVal.Interface()
  }
docs: // currently only supports update struct field value