scancode-toolkit
scancode-toolkit copied to clipboard
Add support to replace directive in go.mod
Fixes #3492
About replace directive in go.mod
Replaces the content of a module at a specific version (or all versions) with another module version or with a local directory. Syntax as shown below
replace module-path [module-version] => replacement-path [replacement-version]
Detailed info at https://go.dev/doc/modules/gomod-ref
Changes made
- Added regex to get module-path, module-version, replacement-path and replacement-version from replace directive
- Wrote conditions to handle single line and multi line replace directives
- Reran opencensus test to account for the replace directive
- Added new test using milvus go.mod to test the replace directive functionality `
@shravankshenoy gentle ping