type identType = ast.Ident
identName := func(n *identType) string { return n.Name }
sKey, sValue := s.Key, s.Value
- var sExtra ast.Expr = nil
+ var sExtra ast.Expr = nil // (used only in types2 fork)
isDef := s.Tok == token.DEFINE
rangeVar := s.X
noNewVarPos := inNode(s, s.TokPos)
// This test should kill the child process after 1ms,
// To maximize compatibility with existing uses of exec.CommandContext, the
// resulting error should be an exec.ExitError without additional wrapping.
- if ee, ok := err.(*exec.ExitError); !ok {
- t.Errorf("Wait error = %v; want %T", err, *ee)
+ if _, ok := err.(*exec.ExitError); !ok {
+ t.Errorf("Wait error = %v; want *exec.ExitError", err)
}
})
defer subProcess.Process.Kill()
var conn net.Conn
- var err error
for {
+ var err error
conn, err = net.Dial("tcp", host)
if err == nil {
break
}
time.Sleep(500 * time.Millisecond)
}
- if err != nil {
- t.Log(b.String())
- t.Fatal(err)
- }
defer conn.Close()
payload := []byte("foobar")
if gp != nil {
hdr[1] = gp.goid
}
- if mp != nil {
- hdr[2] = uint64(mp.procid)
- }
+ hdr[2] = uint64(mp.procid)
// Allow only one writer at a time
for !trace.signalLock.CompareAndSwap(0, 1) {