github.com/corona10/go@v0.0.0-20180224231303-7a218942be57/src/cmd/go/internal/web/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 web 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 Get(url string) ([]byte, error) { 29 return nil, errHTTP 30 } 31 32 func GetMaybeInsecure(importPath string, security SecurityMode) (string, io.ReadCloser, error) { 33 return "", nil, errHTTP 34 } 35 36 func QueryEscape(s string) string { panic("unreachable") } 37 func OpenBrowser(url string) bool { panic("unreachable") }