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