Commit 3333b640 authored by Tim Cooper's avatar Tim Cooper Committed by Brad Fitzpatrick

net/http: use internal/race

Change-Id: Iaa5ded13e8ab4753e2e3d04c9fff203d854208ba
Reviewed-on: https://go-review.googlesource.com/119435Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent bc276c58
......@@ -14,8 +14,6 @@ import (
"time"
)
var raceEnabled = false // set by race.go
// A Header represents the key-value pairs in an HTTP header.
type Header map[string][]string
......
......@@ -6,6 +6,7 @@ package http
import (
"bytes"
"internal/race"
"runtime"
"testing"
"time"
......@@ -196,7 +197,7 @@ func TestHeaderWriteSubsetAllocs(t *testing.T) {
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 {
......
// 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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment