code: func percentage(value, total int64) string {
  	var ratio float64
  	if total != 0 {
  		ratio = float64(value) / float64(total) * 100
  	}
  	switch {
  	case ratio >= 99.95:
  		return "  100%"
  	case ratio >= 1.0:
  		return fmt.Sprintf("%5.2f%%", ratio)
  	default:
  		return fmt.Sprintf("%5.2g%%", ratio)
  	}
  }
docs: // percentage computes the percentage of total of a value, and encodes
  // it as a string. At least two digits of precision are printed.