func ParseScope(qs *url.URL) (*time.Time, *time.Time, error) {
	scope := qs.Query().Get("scope")

	// If the query was not given, return nil, but no error
	if scope == "" {
		return nil, nil, nil
	}

	parts := strings.Split(scope, "-")

	// Check if all the parts are present
	if len(parts) != 6 { //nolint:gomnd // The scope string has 6 parts or it's invalid
		err := errors.New("incorrect date format in scope query")
		return nil, nil, err
	}

	// Parse into timepoints
	upper, err := time.Parse(time.RFC3339, fmt.Sprintf("%s-%s-%sT00:00:00Z", parts[0], parts[1], parts[2]))
	if err != nil {
		return nil, nil, err
	}

	lower, err := time.Parse(time.RFC3339, fmt.Sprintf("%s-%s-%sT00:00:00Z", parts[3], parts[4], parts[5]))

	return &upper, &lower, err
}
// ParseScope query into two dates, or an error.
//nolint:gocritic // Named returns is just inconvenient here
ParseScope query into two dates, or an error.
nolint:gocritic // Named returns is just inconvenient here
// ParseScope query into two dates or an error . // nolint : gocritic // Named returns is just inconvenient here
func ParseScope(qs *url.URL) (*time.Time, *time.Time, error) {
	scope := qs.Query().Get("scope")
	if scope == "" {
		return nil, nil, nil
	}
	parts := strings.Split(scope, "-")
	if len(parts) != 6 { 
		err := errors.New("incorrect date format in scope query")
		return nil, nil, err
	}
	upper, err := time.Parse(time.RFC3339, fmt.Sprintf("%s-%s-%sT00:00:00Z", parts[0], parts[1], parts[2]))
	if err != nil {
		return nil, nil, err
	}
	lower, err := time.Parse(time.RFC3339, fmt.Sprintf("%s-%s-%sT00:00:00Z", parts[3], parts[4], parts[5]))
	return &upper, &lower, err
}
func ParseScope ( qs * url . URL ) ( * time . Time , * time . Time , error ) { scope := qs . Query ( ) . Get ( " " ) if scope == " " { return nil , nil , nil } parts := strings . Split ( scope , " " ) if len ( parts ) != 6 { err := errors . New ( " " ) return nil , nil , err } upper , err := time . Parse ( time . RFC3339 , fmt . Sprintf ( " " , parts [ 0 ] , parts [ 1 ] , parts [ 2 ] ) ) if err != nil { return nil , nil , err } lower , err := time . Parse ( time . RFC3339 , fmt . Sprintf ( " " , parts [ 3 ] , parts [ 4 ] , parts [ 5 ] ) ) return & upper , & lower , err }
ParseScope query into two dates, or an error.
ParseScope query into two dates or an error .
// If the query was not given, return nil, but no error // Check if all the parts are present //nolint:gomnd // The scope string has 6 parts or it's invalid // Parse into timepoints