code: func (d *ResourceDiff) setDiff(key string, new interface{}, computed bool) error {
  	if err := d.clear(key); err != nil {
  		return err
  	}
  
  	if err := d.newWriter.WriteField(strings.Split(key, "."), new, computed); err != nil {
  		return fmt.Errorf("Cannot set new diff value for key %s: %s", key, err)
  	}
  
  	d.updatedKeys[key] = true
  
  	return nil
  }
docs: // setDiff performs common diff setting behaviour.