scancode-toolkit icon indicating copy to clipboard operation
scancode-toolkit copied to clipboard

Add support to replace directive in go.mod

Open shravankshenoy opened this issue 1 year ago • 1 comments

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 avatar Mar 08 '24 07:03 shravankshenoy

@shravankshenoy gentle ping

AyanSinhaMahapatra avatar Oct 19 '24 11:10 AyanSinhaMahapatra