File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ import (
1818// majorVersionRegexp checks if an import path contains a major version suffix.
1919var majorVersionRegexp = regexp .MustCompile (`([/.])v([0-9]+)$` )
2020
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+
2128func get (gopath , repodir , repo , rev string ) error {
2229 done := make (chan struct {})
2330 defer close (done )
@@ -237,6 +244,11 @@ func estimate(importpath, revision string) error {
237244 return
238245 }
239246 }
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+ }
240252 line := strings .Repeat (" " , indent )
241253 if rrseen [repoRoot ] {
242254 line += fmt .Sprintf ("\033 [90m%s\033 [0m" , mod )
You can’t perform that action at this time.
0 commit comments