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 "errors" | 8 "errors" |
9 "exp/types" | |
10 "flag" | 9 "flag" |
11 "fmt" | 10 "fmt" |
12 "go/ast" | 11 "go/ast" |
13 "go/parser" | 12 "go/parser" |
14 "go/scanner" | 13 "go/scanner" |
15 "go/token" | 14 "go/token" |
| 15 "go/types" |
16 "io/ioutil" | 16 "io/ioutil" |
17 "os" | 17 "os" |
18 "path/filepath" | 18 "path/filepath" |
19 "strings" | 19 "strings" |
20 ) | 20 ) |
21 | 21 |
22 var ( | 22 var ( |
23 // main operation modes | 23 // main operation modes |
24 pkgName = flag.String("p", "", "process only those files in package pk
gName") | 24 pkgName = flag.String("p", "", "process only those files in package pk
gName") |
25 recursive = flag.Bool("r", false, "recursively process subdirectories") | 25 recursive = flag.Bool("r", false, "recursively process subdirectories") |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 if flag.NArg() == 0 { | 183 if flag.NArg() == 0 { |
184 fset := token.NewFileSet() | 184 fset := token.NewFileSet() |
185 processPackage(fset, parseStdin(fset)) | 185 processPackage(fset, parseStdin(fset)) |
186 } else { | 186 } else { |
187 processFiles(flag.Args(), true) | 187 processFiles(flag.Args(), true) |
188 } | 188 } |
189 | 189 |
190 os.Exit(exitCode) | 190 os.Exit(exitCode) |
191 } | 191 } |
LEFT | RIGHT |