OLD | NEW |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build cmd_go_bootstrap | 5 // +build cmd_go_bootstrap |
6 | 6 |
7 // This code is compiled only into the bootstrap 'go' binary. | 7 // This code is compiled only into the bootstrap 'go' binary. |
8 // These stubs avoid importing packages with large dependency | 8 // These stubs avoid importing packages with large dependency |
9 // trees, like the use of "net/http" in vcs.go. | 9 // trees, like the use of "net/http" in vcs.go. |
10 | 10 |
11 package main | 11 package main |
12 | 12 |
13 import "errors" | 13 import ( |
| 14 » "errors" |
| 15 » "io" |
| 16 ) |
| 17 |
| 18 var errHTTP = errors.New("no http in bootstrap go command") |
14 | 19 |
15 func httpGET(url string) ([]byte, error) { | 20 func httpGET(url string) ([]byte, error) { |
16 » return nil, errors.New("no http in bootstrap go command") | 21 » return nil, errHTTP |
17 } | 22 } |
| 23 |
| 24 func httpsOrHTTP(importPath string) (string, io.ReadCloser, error) { |
| 25 return "", nil, errHTTP |
| 26 } |
| 27 |
| 28 func parseMetaGoImports(r io.Reader) (imports []metaImport) { |
| 29 panic("unreachable") |
| 30 } |
OLD | NEW |