code: func (c *remoteClient) lockInfo() (*state.LockInfo, error) {
  	r, err := c.lockFile().NewReader(c.storageContext)
  	if err != nil {
  		return nil, err
  	}
  	defer r.Close()
  
  	rawData, err := ioutil.ReadAll(r)
  	if err != nil {
  		return nil, err
  	}
  
  	info := &state.LockInfo{}
  	if err := json.Unmarshal(rawData, info); err != nil {
  		return nil, err
  	}
  
  	// We use the Generation as the ID, so overwrite the ID in the json.
  	// This can't be written into the Info, since the generation isn't known
  	// until it's written.
  	attrs, err := c.lockFile().Attrs(c.storageContext)
  	if err != nil {
  		return nil, err
  	}
  	info.ID = strconv.FormatInt(attrs.Generation, 10)
  
  	return info, nil
  }
docs: // lockInfo reads the lock file, parses its contents and returns the parsed
  // LockInfo struct.