func formatDuration(d time.Duration) string {
	var s string
	if d >= time.Hour {
		s += fmt.Sprintf("%dh", d/time.Hour)
		d %= time.Hour
	}
	if d >= time.Minute {
		s += fmt.Sprintf("%dm", d/time.Minute)
		d %= time.Minute
	}
	if sec := d / time.Second; sec > 0 || s == "" {
		s += fmt.Sprintf("%ds", sec)
	}
	return s
}
// formatDuration formats d as e.g. "4h23m5s", "2m4s", or "14s".
formatDuration formats d as e.g.
// formatDuration formats d as e . g . " 4h23m5s " " 2m4s " or " 14s " .
func formatDuration(d time.Duration) string {
	var s string
	if d >= time.Hour {
		s += fmt.Sprintf("%dh", d/time.Hour)
		d %= time.Hour
	}
	if d >= time.Minute {
		s += fmt.Sprintf("%dm", d/time.Minute)
		d %= time.Minute
	}
	if sec := d / time.Second; sec > 0 || s == "" {
		s += fmt.Sprintf("%ds", sec)
	}
	return s
}
func formatDuration ( d time . Duration ) string { var s string if d >= time . Hour { s += fmt . Sprintf ( " " , d / time . Hour ) d %= time . Hour } if d >= time . Minute { s += fmt . Sprintf ( " " , d / time . Minute ) d %= time . Minute } if sec := d / time . Second ; sec > 0 || s == " " { s += fmt . Sprintf ( " " , sec ) } return s }
formatDuration formats d as e.g.
formatDuration formats d as e . g .