github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/go/internal/modload/search.go (about)

     1  // Copyright 2018 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package modload
     6  
     7  import (
     8  	"github.com/shogo82148/std/context"
     9  
    10  	"github.com/shogo82148/std/cmd/go/internal/search"
    11  
    12  	"golang.org/x/mod/module"
    13  )
    14  
    15  // MatchInModule identifies the packages matching the given pattern within the
    16  // given module version, which does not need to be in the build list or module
    17  // requirement graph.
    18  //
    19  // If m is the zero module.Version, MatchInModule matches the pattern
    20  // against the standard library (std and cmd) in GOROOT/src.
    21  func MatchInModule(ctx context.Context, pattern string, m module.Version, tags map[string]bool) *search.Match