mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
* Prevent duplicate Go packages after source replacement resolution Source analysis already applies module replacements through go/packages. Avoid synthesizing the same replacement again from go.mod while retaining fallback synthesis for modules that source analysis did not resolve. Constraint: Preserve unimported and local-path replacement cataloging. Rejected: Deduplicate only during final assembly | That retains redundant license lookup and ambiguous metadata ownership. Confidence: high Scope-risk: narrow Directive: Keep go.mod fallback packages limited to modules absent from source analysis. Tested: Focused replacement regression, related Go module parser tests, go vet, gofmt, and diff checks. Not-tested: Docker-backed full cataloger fixtures; local root storage was exhausted by image generation. Signed-off-by: ychampion <ychampion@users.noreply.github.com> * Keep replacement fixtures with the Go module test data Constraint: The maintainer reserves internal/gotestdata for fixtures that need special Go tooling discovery. Rejected: Leave this fixture in gotestdata | The regression opens its module explicitly and does not need the special location. Confidence: high Scope-risk: narrow Directive: Use internal/gotestdata only when a fixture must avoid Go testdata discovery rules. Tested: replacement regression repeated 10 times; Go module parser table; go vet for the Go cataloger; gofmt; diff checks. Not-tested: Full cataloger package; three unrelated parser fixtures fail identically on exact prior head in this environment. Signed-off-by: ychampion <ychampion@users.noreply.github.com> --------- Signed-off-by: ychampion <ychampion@users.noreply.github.com> Co-authored-by: ychampion <ychampion@users.noreply.github.com>
12 lines
94 B
Go
12 lines
94 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"rsc.io/quote"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println(quote.Hello())
|
|
}
|