code: func Connect(ctx context.Context, f AdvFilter) (Client, error) {
  	ctx2, cancel := context.WithCancel(ctx)
  	go func() {
  		select {
  		case <-ctx.Done():
  			cancel()
  		case <-ctx2.Done():
  		}
  	}()
  
  	ch := make(chan Advertisement)
  	fn := func(a Advertisement) {
  		cancel()
  		ch <- a
  	}
  	if err := Scan(ctx2, false, fn, f); err != nil {
  		if err != context.Canceled {
  			return nil, errors.Wrap(err, "can't scan")
  		}
  	}
  
  	cln, err := Dial(ctx, (<-ch).Address())
  	return cln, errors.Wrap(err, "can't dial")
  }
docs: // Connect searches for and connects to a Peripheral which matches specified condition.