TODO(rfindley): move the utility functions below to a util.go file. IsCommandLineArguments reports whether a given value denotes "command-line-arguments" package, which is a package with an unknown ID created by the go command. It can have a test variant, which is why callers should not check that a
(id PackageID)
| 182 | // created by the go command. It can have a test variant, which is why callers |
| 183 | // should not check that a value equals "command-line-arguments" directly. |
| 184 | func IsCommandLineArguments(id PackageID) bool { |
| 185 | return strings.Contains(string(id), "command-line-arguments") |
| 186 | } |
| 187 | |
| 188 | // SortPostOrder sorts the IDs so that if x depends on y, then y appears before x. |
| 189 | func SortPostOrder(meta Source, ids []PackageID) { |
no test coverage detected
searching dependent graphs…