func ParseInterval(s string) (Interval, error) {
	q, err := strconv.ParseInt(s[:len(s)-1], 10, 64)
	if err != nil {
		return 0, err
	}
	unit, ok := unitMap[s[len(s)-1:]]
	if !ok {
		return 0, fmt.Errorf("Unknown unit in '%s'", s)
	}
	return Interval(q) * unit, nil
}
// ParseInterval parses an interval string. An interval string is string
// containing a positive integer, follwed by a unit suffix. e.g. "300s" or "15d".
// No spaces or other characters are allowed. Valid units are "s", "m", "h", and
// "d".
ParseInterval parses an interval string. An interval string is string
containing a positive integer, follwed by a unit suffix. e.g.
// ParseInterval parses an interval string . An interval string is string // containing a positive integer follwed by a unit suffix . e . g . " 300s " or " 15d " . // No spaces or other characters are allowed . Valid units are " s " " m " " h " and // " d " .
func ParseInterval(s string) (Interval, error) {
	q, err := strconv.ParseInt(s[:len(s)-1], 10, 64)
	if err != nil {
		return 0, err
	}
	unit, ok := unitMap[s[len(s)-1:]]
	if !ok {
		return 0, fmt.Errorf("Unknown unit in '%s'", s)
	}
	return Interval(q) * unit, nil
}
func ParseInterval ( s string ) ( Interval , error ) { q , err := strconv . ParseInt ( s [ : len ( s ) - 1 ] , 10 , 64 ) if err != nil { return 0 , err } unit , ok := unitMap [ s [ len ( s ) - 1 : ] ] if ! ok { return 0 , fmt . Errorf ( " " , s ) } return Interval ( q ) * unit , nil }
ParseInterval parses an interval string.
ParseInterval parses an interval string .