789 return data
790}
791
792func writeLogs(ctx context.Context, pw prefix.Writer, r io.Reader, services map[string]bool) {793 ls := bufio.NewScanner(r)
794
795 ls.Buffer(make([]byte, ScannerStartSize), ScannerMaxSize)
755 StackTrace() errors.StackTrace
756}
757
758func handleErrors(ctx context.Context, pw prefix.Writer, errch chan error) {759 for {
760 select {
761 case <-ctx.Done():
472 }
473}
474
475func (opts Options2) watchPath(ctx context.Context, pw prefix.Writer, service, root string, bs buildSource, ignores []string, ch chan error) {476 cch := make(chan changes.Change, 1)
477
478 abs, err := filepath.Abs(bs.Local)
468 }
469
470 for _, bs := range bss {
471 go opts.watchPath(ctx, pw, service, root, bs, ignores, ch)472 }
473}
474
454 }
455}
456
457func (opts Options2) watchChanges(ctx context.Context, pw prefix.Writer, m *manifest.Manifest, service, root string, ch chan error) {458 bss, err := buildSources(m, root, service)
459 if err != nil {
460 ch <- fmt.Errorf("sync error: %s", err)
Inadvertently copying a value containing a lock, such as sync.Mutex or sync.WaitGroup, may cause both copies to malfunction. Generally such values should be referred to through a pointer.
For example,
var x *sync.Mutex
p := x
var y sync.Mutex
p = &y
*p = *x
is not recommended because it copies the lock value.