{"record":{"id":"3aa2122f24b4031f","repo":"golang/go","slug":"parse-s-v","errorCode":null,"errorMessage":"parse %s: %v","messagePattern":"parse (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/go/internal/vcs/vcs.go","lineNumber":1021,"sourceCode":"\t}\n\tbody := resp.Body\n\tdefer body.Close()\n\timports, err := parseMetaGoImports(body, mod)\n\tif len(imports) == 0 {\n\t\tif respErr := resp.Err(); respErr != nil {\n\t\t\t// If the server's status was not OK, prefer to report that instead of\n\t\t\t// an XML parse error.\n\t\t\treturn nil, respErr\n\t\t}\n\t}\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing %s: %v\", importPath, err)\n\t}\n\t// Find the matched meta import.\n\tmmi, err := matchGoImport(imports, importPath)\n\tif err != nil {\n\t\tif _, ok := err.(ImportMismatchError); !ok {\n\t\t\treturn nil, fmt.Errorf(\"parse %s: %v\", url, err)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"parse %s: no go-import meta tags (%s)\", resp.URL, err)\n\t}\n\tif cfg.BuildV {\n\t\tlog.Printf(\"get %q: found meta tag %#v at %s\", importPath, mmi, url)\n\t}\n\t// If the import was \"uni.edu/bob/project\", which said the\n\t// prefix was \"uni.edu\" and the RepoRoot was \"evilroot.com\",\n\t// make sure we don't trust Bob and check out evilroot.com to\n\t// \"uni.edu\" yet (possibly overwriting/preempting another\n\t// non-evil student). Instead, first verify the root and see\n\t// if it matches Bob's claim.\n\tif mmi.Prefix != importPath {\n\t\tif cfg.BuildV {\n\t\t\tlog.Printf(\"get %q: verifying non-authoritative meta tag\", importPath)\n\t\t}\n\t\tvar imports []metaImport\n\t\turl, imports, err = metaImportsForPrefix(mmi.Prefix, mod, security)","sourceCodeStart":1003,"sourceCodeEnd":1039,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/go/internal/vcs/vcs.go#L1003-L1039","documentation":"Raised inside matchGoImport when matching the parsed meta imports against the requested import path fails for a reason OTHER than an ImportMismatchError. The %s is the request URL; %v is the underlying match error. The non-mismatch branch typically means multiple/structurally invalid entries short-circuited before mismatch classification.","triggerScenarios":"The parsed meta-import set causes matchGoImport to return a non-mismatch error (e.g. an internal inconsistency) before the mismatch path is reached.","commonSituations":"Server lists contradictory or duplicate meta-import lines for overlapping prefixes; legacy vanity server with malformed entries; transient inconsistency between concurrent fetches.","solutions":["Inspect the page's go-import meta tags and ensure exactly one cleanly matches the full import path","Remove duplicate or overlapping meta-import declarations on the vanity server","Re-fetch after correcting the meta tags and clear the module cache"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure the meta-import set has exactly one matching prefix\nfunc uniqueMatch(imports []metaImport, importPath string) (metaImport, error) {\n  match := -1\n  for i, im := range imports {\n    if !str.HasPathPrefix(importPath, im.Prefix) { continue }\n    if match >= 0 { return metaImport{}, fmt.Errorf(\"ambiguous: %s and %s\", imports[match].Prefix, im.Prefix) }\n    match = i\n  }\n  if match == -1 { return metaImport{}, errors.New(\"no match\") }\n  return imports[match], nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Publish one go-import meta tag per module root","Avoid overlapping prefixes on the same vanity page"],"tags":["go","modules","vcs","vanity"],"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T08:17:17.861Z"}