github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/go/internal/web/http.go (about) 1 // Copyright 2012 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build !cmd_go_bootstrap 6 7 // This code is compiled into the real 'go' binary, but it is not 8 // compiled into the binary that is built during all.bash, so as 9 // to avoid needing to build net (and thus use cgo) during the 10 // bootstrap process. 11 12 package web 13 14 import ( 15 "github.com/shogo82148/std/net/http" 16 ) 17 18 type Interceptor struct { 19 Scheme string 20 FromHost string 21 ToHost string 22 Client *http.Client 23 } 24 25 func EnableTestHooks(interceptors []Interceptor) error 26 27 func DisableTestHooks()