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 @@ -17,6 +17,13 @@ import (
1717// majorVersionRegexp checks if an import path contains a major version suffix.
1818var majorVersionRegexp = regexp .MustCompile (`([/.])v([0-9]+)$` )
1919
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+
2027func get (gopath , repodir , repo , rev string ) error {
2128 done := make (chan struct {})
2229 defer close (done )
@@ -230,6 +237,11 @@ func estimate(importpath, revision string) error {
230237 return
231238 }
232239 }
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+ }
233245 line := strings .Repeat (" " , indent )
234246 if rrseen [repoRoot ] {
235247 line += fmt .Sprintf ("\033 [90m%s\033 [0m" , mod )
You can’t perform that action at this time.
0 commit comments