code: func validateQueryContext(ctx context.Context) error {
  	select {
  	case <-ctx.Done():
  		switch err := ctx.Err(); err {
  		case context.Canceled:
  			return ErrQueryCancelled
  		case context.DeadlineExceeded:
  			return ErrQueryTimeout
  		default:
  			return err
  		}
  	default:
  		return nil
  	}
  }
docs: // validateQueryContext returns a query-appropriate error if the context is done.