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 import ( | 7 import ( |
8 "bufio" | 8 "bufio" |
9 "encoding/json" | 9 "encoding/json" |
10 "io" | 10 "io" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 code.google.com/p/google-api-go-client/books/v1 | 24 code.google.com/p/google-api-go-client/books/v1 |
25 code.google.com/p/goauth2/oauth | 25 code.google.com/p/goauth2/oauth |
26 code.google.com/p/sqlite | 26 code.google.com/p/sqlite |
27 | 27 |
28 The -f flag specifies an alternate format for the list, using the | 28 The -f flag specifies an alternate format for the list, using the |
29 syntax of package template. The default output is equivalent to -f | 29 syntax of package template. The default output is equivalent to -f |
30 '{{.ImportPath}}'. The struct being passed to the template is: | 30 '{{.ImportPath}}'. The struct being passed to the template is: |
31 | 31 |
32 type Package struct { | 32 type Package struct { |
33 Dir string // directory containing package sources | 33 Dir string // directory containing package sources |
34 ImportPath string // import path of package in dir | 34 ImportPath string // import path of package in dir |
35 Name string // package name | 35 ImportComment string // path in import comment on package statement |
36 Doc string // package documentation string | 36 Name string // package name |
37 Target string // install path | 37 Doc string // package documentation string |
38 Goroot bool // is this package in the Go root? | 38 Target string // install path |
39 Standard bool // is this package part of the standard Go library? | 39 Goroot bool // is this package in the Go root? |
40 Stale bool // would 'go install' do anything for this package? | 40 Standard bool // is this package part of the standard Go library? |
41 Root string // Go root or Go path dir containing this package | 41 Stale bool // would 'go install' do anything for this package? |
| 42 Root string // Go root or Go path dir containing this package |
42 | 43 |
43 // Source files | 44 // Source files |
44 GoFiles []string // .go source files (excluding CgoFiles, TestGoF
iles, XTestGoFiles) | 45 GoFiles []string // .go source files (excluding CgoFiles, TestGoF
iles, XTestGoFiles) |
45 CgoFiles []string // .go sources files that import "C" | 46 CgoFiles []string // .go sources files that import "C" |
46 IgnoredGoFiles []string // .go sources ignored due to build constraints | 47 IgnoredGoFiles []string // .go sources ignored due to build constraints |
47 CFiles []string // .c source files | 48 CFiles []string // .c source files |
48 CXXFiles []string // .cc, .cxx and .cpp source files | 49 CXXFiles []string // .cc, .cxx and .cpp source files |
49 MFiles []string // .m source files | 50 MFiles []string // .m source files |
50 HFiles []string // .h, .hh, .hpp and .hxx source files | 51 HFiles []string // .h, .hh, .hpp and .hxx source files |
51 SFiles []string // .s source files | 52 SFiles []string // .s source files |
52 SwigFiles []string // .swig files | 53 SwigFiles []string // .swig files |
53 SwigCXXFiles []string // .swigcxx files | 54 SwigCXXFiles []string // .swigcxx files |
54 SysoFiles []string // .syso object files to add to archive | 55 SysoFiles []string // .syso object files to add to archive |
55 | 56 |
56 // Cgo directives | 57 // Cgo directives |
57 CgoCFLAGS []string // cgo: flags for C compiler | 58 CgoCFLAGS []string // cgo: flags for C compiler |
58 CgoCPPFLAGS []string // cgo: flags for C preprocessor | 59 CgoCPPFLAGS []string // cgo: flags for C preprocessor |
59 CgoCXXFLAGS []string // cgo: flags for C++ compiler | 60 CgoCXXFLAGS []string // cgo: flags for C++ compiler |
60 CgoLDFLAGS []string // cgo: flags for linker | 61 CgoLDFLAGS []string // cgo: flags for linker |
61 CgoPkgConfig []string // cgo: pkg-config names | 62 CgoPkgConfig []string // cgo: pkg-config names |
62 | 63 |
63 // Dependency information | 64 // Dependency information |
64 Imports []string // import paths used by this package | 65 Imports []string // import paths used by this package |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 return | 200 return |
200 } | 201 } |
201 | 202 |
202 func (t *TrackingWriter) Flush() { | 203 func (t *TrackingWriter) Flush() { |
203 t.w.Flush() | 204 t.w.Flush() |
204 } | 205 } |
205 | 206 |
206 func (t *TrackingWriter) NeedNL() bool { | 207 func (t *TrackingWriter) NeedNL() bool { |
207 return t.last != '\n' | 208 return t.last != '\n' |
208 } | 209 } |
LEFT | RIGHT |