mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
Use glob matching for package paths (#1409)
- Match the behavior of GOPRIVATE/GONOPROXY/GONOSUMDB
This commit is contained in:
committed by
Marwan Sulaiman
parent
90b3c1dc97
commit
ed66d85f3f
@@ -36,6 +36,28 @@ var testCases = []struct {
|
||||
input: "github.com/gomods/athens",
|
||||
expectedMode: None,
|
||||
},
|
||||
{
|
||||
name: "multiple depth pattern match",
|
||||
file: &DownloadFile{
|
||||
Mode: Sync,
|
||||
Paths: []*DownloadPath{
|
||||
{Pattern: "github.com/*", Mode: None},
|
||||
},
|
||||
},
|
||||
input: "github.com/gomods/athens/pkg/mode",
|
||||
expectedMode: None,
|
||||
},
|
||||
{
|
||||
name: "subdomain pattern match",
|
||||
file: &DownloadFile{
|
||||
Mode: Sync,
|
||||
Paths: []*DownloadPath{
|
||||
{Pattern: "*.github.com/gomods/*", Mode: None},
|
||||
},
|
||||
},
|
||||
input: "athens.github.com/gomods/pkg/mode",
|
||||
expectedMode: None,
|
||||
},
|
||||
{
|
||||
name: "pattern fallback",
|
||||
file: &DownloadFile{
|
||||
|
||||
Reference in New Issue
Block a user