{"record":{"id":"b7240f56a1530d9f","repo":"golang/go","slug":"parse-s-no-go-import-meta-tags-s","errorCode":null,"errorMessage":"parse %s: no go-import meta tags (%s)","messagePattern":"parse (.+?): no go-import meta tags \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/go/internal/vcs/vcs.go","lineNumber":1023,"sourceCode":"\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)\n\t\tif err != nil {\n\t\t\treturn nil, err","sourceCodeStart":1005,"sourceCodeEnd":1041,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/go/internal/vcs/vcs.go#L1005-L1041","documentation":"Fired when matchGoImport returns an ImportMismatchError: meta tags exist but none has a prefix that is a path-prefix of the requested import path. The %s is resp.URL (final URL after redirects); the parenthesized %s lists the candidate prefixes that mismatched.","triggerScenarios":"Asking for 'example.com/foo/bar' when the server only declares 'example.com/baz'; or the declared prefix does not cover the requested subpath.","commonSituations":"Typo in the subpackage path; vanity server configured for a different module root; module moved and meta tags were updated to a new prefix; redirected to a host whose tags don't cover the original path.","solutions":["Confirm the correct import path from the module's documentation","Verify the server's go-import meta tag prefix actually covers your import path (prefix must be an ancestor of the path)","Update to the module's new canonical path if it was renamed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify the declared prefix covers the import path before resolving\nfunc prefixCovers(prefix, importPath string) bool {\n  return importPath == prefix || strings.HasPrefix(importPath, prefix+\"/\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy the exact module path from upstream docs/go.mod","When a module is renamed, update all imports to the new canonical path"],"tags":["go","modules","vcs","vanity"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}