code: func FormatDuration(inter time.Duration) string {
  	if inter >= year {
  		return fmt.Sprintf("%dy", inter/year)
  	}
  
  	if inter >= day {
  		return fmt.Sprintf("%dd", inter/day)
  	}
  
  	if inter >= time.Hour {
  		return fmt.Sprintf("%dh", inter/time.Hour)
  	}
  
  	if inter >= time.Minute {
  		return fmt.Sprintf("%dm", inter/time.Minute)
  	}
  
  	if inter >= time.Second {
  		return fmt.Sprintf("%ds", inter/time.Second)
  	}
  
  	if inter >= time.Millisecond {
  		return fmt.Sprintf("%dms", inter/time.Millisecond)
  	}
  
  	return "1ms"
  }
docs: // FormatDuration converts a duration into the kbn format e.g. 1m 2h or 3d