From: Bryan C. Mills Date: Tue, 9 Jul 2019 21:33:58 +0000 (-0400) Subject: cmd/go/internal/modload: remove unused warnPattern function X-Git-Tag: go1.13rc1~108 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a05c13206450322844dd67cdf2acac430338c7cd;p=gostls13.git cmd/go/internal/modload: remove unused warnPattern function Change-Id: I6cf66870952d4c652912dd50a0b9af41bdc79dce Reviewed-on: https://go-review.googlesource.com/c/go/+/185346 Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot Reviewed-by: Emmanuel Odeke Reviewed-by: Jay Conrod --- diff --git a/src/cmd/go/internal/modload/load.go b/src/cmd/go/internal/modload/load.go index 1e9a1a3c35..992fa70b79 100644 --- a/src/cmd/go/internal/modload/load.go +++ b/src/cmd/go/internal/modload/load.go @@ -247,16 +247,6 @@ func pathInModuleCache(dir string) string { return "" } -// warnPattern returns list, the result of matching pattern, -// but if list is empty then first it prints a warning about -// the pattern not matching any packages. -func warnPattern(pattern string, list []string) []string { - if len(list) == 0 { - fmt.Fprintf(os.Stderr, "warning: %q matched no packages\n", pattern) - } - return list -} - // ImportFromFiles adds modules to the build list as needed // to satisfy the imports in the named Go source files. func ImportFromFiles(gofiles []string) {