code: func (c *Client) Put(key string, data []byte, opts ...datasync.PutOption) error {
  	newEntry := &decoder.FileDataEntry{Key: key, Value: data}
  	statusDataEntries := c.db.GetDataForFile(c.statusPath)
  	// Add/update data
  	var updated bool
  	for _, statusDataEntry := range statusDataEntries {
  		if statusDataEntry.Key == key {
  			statusDataEntry.Value = data
  			updated = true
  			break
  		}
  	}
  	if !updated {
  		statusDataEntries = append(statusDataEntries, newEntry)
  	}
  	c.db.Add(c.statusPath, newEntry)
  	// Encode and write
  	stFileEntries, err := c.statusDecoder.Encode(statusDataEntries)
  	if err != nil {
  		return errors.Errorf("failed to write status to fileDB: unable to encode status file %s: %v", c.statusPath, err)
  	}
  	err = c.fsHandler.WriteFile(c.statusPath, stFileEntries)
  	if err != nil {
  		return errors.Errorf("failed to write status %s to fileDB: %v", c.statusPath, err)
  	}
  	return nil
  }
docs: // Put reads status file, add data to it and performs write