github.com/FenixAra/go@v0.0.0-20170127160404-96ea0918e670/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 type httpError struct { 21 statusCode int 22 } 23 24 func (e *httpError) Error() string { 25 panic("unreachable") 26 } 27 28 func httpGET(url string) ([]byte, error) { 29 return nil, errHTTP 30 } 31 32 func httpsOrHTTP(importPath string, security securityMode) (string, io.ReadCloser, error) { 33 return "", nil, errHTTP 34 } 35 36 func parseMetaGoImports(r io.Reader) ([]metaImport, error) { 37 panic("unreachable") 38 } 39 40 func queryEscape(s string) string { panic("unreachable") } 41 func openBrowser(url string) bool { panic("unreachable") }