File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ import (
17
17
// majorVersionRegexp checks if an import path contains a major version suffix.
18
18
var majorVersionRegexp = regexp .MustCompile (`([/.])v([0-9]+)$` )
19
19
20
+ // moduleBlocklist is a map of modules that we want to exclude from the estimate
21
+ // output, associated with the reason why.
22
+ var moduleBlocklist = map [string ]string {
23
+ "github.com/arduino/go-win32-utils" : "Windows only" ,
24
+ "github.com/Microsoft/go-winio" : "Windows only" ,
25
+ }
26
+
20
27
func get (gopath , repodir , repo , rev string ) error {
21
28
done := make (chan struct {})
22
29
defer close (done )
@@ -230,6 +237,11 @@ func estimate(importpath, revision string) error {
230
237
return
231
238
}
232
239
}
240
+ // Ignore modules from the blocklist.
241
+ if reason , found := moduleBlocklist [mod ]; found {
242
+ log .Printf ("Ignoring module %s: %s" , mod , reason )
243
+ return
244
+ }
233
245
line := strings .Repeat (" " , indent )
234
246
if rrseen [repoRoot ] {
235
247
line += fmt .Sprintf ("\033 [90m%s\033 [0m" , mod )
You can’t perform that action at this time.
0 commit comments