LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 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 package main | 5 package main |
6 | 6 |
7 var helpC = &Command{ | 7 var helpC = &Command{ |
8 UsageLine: "c", | 8 UsageLine: "c", |
9 Short: "calling between Go and C", | 9 Short: "calling between Go and C", |
10 Long: ` | 10 Long: ` |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 the go tool will verify that https://example.org/?go-get=1 contains the | 229 the go tool will verify that https://example.org/?go-get=1 contains the |
230 same meta tag and then git clone https://code.org/r/p/exproj into | 230 same meta tag and then git clone https://code.org/r/p/exproj into |
231 GOPATH/src/example.org. | 231 GOPATH/src/example.org. |
232 | 232 |
233 New downloaded packages are written to the first directory | 233 New downloaded packages are written to the first directory |
234 listed in the GOPATH environment variable (see 'go help gopath'). | 234 listed in the GOPATH environment variable (see 'go help gopath'). |
235 | 235 |
236 The go command attempts to download the version of the | 236 The go command attempts to download the version of the |
237 package appropriate for the Go release being used. | 237 package appropriate for the Go release being used. |
238 Run 'go help install' for more. | 238 Run 'go help get' for more. |
| 239 |
| 240 Import path checking |
| 241 |
| 242 When the custom import path feature described above redirects to a |
| 243 known code hosting site, each of the resulting packages has two possible |
| 244 import paths, using the custom domain or the known hosting site. |
| 245 |
| 246 A package statement is said to have an "import comment" if it is immediately |
| 247 followed (before the next newline) by a comment of one of these two forms: |
| 248 |
| 249 » package math // import "path" |
| 250 » package math /* import "path" */ |
| 251 |
| 252 The go command will refuse to install a package with an import comment |
| 253 unless it is being referred to by that import path. In this way, import comments |
| 254 let package authors make sure the custom import path is used and not a |
| 255 direct path to the underlying code hosting site. |
| 256 |
| 257 See https://golang.org/s/go14customimport for details. |
239 `, | 258 `, |
240 } | 259 } |
241 | 260 |
242 var helpGopath = &Command{ | 261 var helpGopath = &Command{ |
243 UsageLine: "gopath", | 262 UsageLine: "gopath", |
244 Short: "GOPATH environment variable", | 263 Short: "GOPATH environment variable", |
245 Long: ` | 264 Long: ` |
246 The Go path is used to resolve import statements. | 265 The Go path is used to resolve import statements. |
247 It is implemented by and documented in the go/build package. | 266 It is implemented by and documented in the go/build package. |
248 | 267 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 SWIG definition files. | 353 SWIG definition files. |
335 .syso | 354 .syso |
336 System object files. | 355 System object files. |
337 | 356 |
338 Files of each of these types except .syso may contain build | 357 Files of each of these types except .syso may contain build |
339 constraints, but the go command stops scanning for build constraints | 358 constraints, but the go command stops scanning for build constraints |
340 at the first item in the file that is not a blank line or //-style | 359 at the first item in the file that is not a blank line or //-style |
341 line comment. | 360 line comment. |
342 `, | 361 `, |
343 } | 362 } |
LEFT | RIGHT |