Change-Id: Iaa5ded13e8ab4753e2e3d04c9fff203d854208ba
Reviewed-on: https://go-review.googlesource.com/119435
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
"time"
)
-var raceEnabled = false // set by race.go
-
// A Header represents the key-value pairs in an HTTP header.
type Header map[string][]string
import (
"bytes"
+ "internal/race"
"runtime"
"testing"
"time"
if testing.Short() {
t.Skip("skipping alloc test in short mode")
}
- if raceEnabled {
+ if race.Enabled {
t.Skip("skipping test under race detector")
}
if runtime.GOMAXPROCS(0) > 1 {
+++ /dev/null
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build race
-
-package http
-
-func init() {
- raceEnabled = true
-}