code: func (c *cipdSubcommand) doneWithPinMap(pins map[string][]pinInfo, err error) int {
  	if len(pins) == 0 {
  		if err == nil { // this error will be printed in c.done(...)
  			fmt.Println("No packages.")
  		}
  	} else {
  		printPinsAndError(pins)
  	}
  	if ret := c.done(pins, err); ret != 0 {
  		return ret
  	}
  	for _, infos := range pins {
  		if hasErrors(infos) {
  			return 1
  		}
  	}
  	return 0
  }
docs: // doneWithPinMap is a handy shortcut that prints the subdir->pinInfo map and
  // deduces process exit code based on presence of errors there.