github.com/ccccaoqing/test@v0.0.0-20220510085219-3985d23445c0/src/cmd/go/bootstrap.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 // +build cmd_go_bootstrap 6 7 // This code is compiled only into the bootstrap 'go' binary. 8 // These stubs avoid importing packages with large dependency 9 // trees, like the use of "net/http" in vcs.go. 10 11 package main 12 13 import ( 14 "errors" 15 "io" 16 ) 17 18 var errHTTP = errors.New("no http in bootstrap go command") 19 20 func httpGET(url string) ([]byte, error) { 21 return nil, errHTTP 22 } 23 24 func httpsOrHTTP(importPath string) (string, io.ReadCloser, error) { 25 return "", nil, errHTTP 26 } 27 28 func parseMetaGoImports(r io.Reader) ([]metaImport, error) { 29 panic("unreachable") 30 }