code: func (s *fs) Set(data []byte) (digest.Digest, error) {
  	s.Lock()
  	defer s.Unlock()
  
  	if len(data) == 0 {
  		return "", fmt.Errorf("invalid empty data")
  	}
  
  	dgst := digest.FromBytes(data)
  	if err := ioutils.AtomicWriteFile(s.contentFile(dgst), data, 0600); err != nil {
  		return "", errors.Wrap(err, "failed to write digest data")
  	}
  
  	return dgst, nil
  }
docs: // Set stores content by checksum.