{"record":{"id":"e4d4d009cb248e80","repo":"golang/go","slug":"fetching-s-no-go-import-meta-tag-found-in-s","errorCode":null,"errorMessage":"fetching %s: no go-import meta tag found in %s","messagePattern":"fetching (.+?): no go-import meta tag found in (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/go/internal/vcs/vcs.go","lineNumber":1168,"sourceCode":"\t\tresp, err := web.Get(security, url)\n\t\tif err != nil {\n\t\t\treturn setCache(fetchResult{url: url, err: fmt.Errorf(\"fetching %s: %v\", importPrefix, err)})\n\t\t}\n\t\tbody := resp.Body\n\t\tdefer body.Close()\n\t\timports, err := parseMetaGoImports(body, mod)\n\t\tif len(imports) == 0 {\n\t\t\tif respErr := resp.Err(); respErr != nil {\n\t\t\t\t// If the server's status was not OK, prefer to report that instead of\n\t\t\t\t// an XML parse error.\n\t\t\t\treturn setCache(fetchResult{url: url, err: respErr})\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\treturn setCache(fetchResult{url: url, err: fmt.Errorf(\"parsing %s: %v\", resp.URL, err)})\n\t\t}\n\t\tif len(imports) == 0 {\n\t\t\terr = fmt.Errorf(\"fetching %s: no go-import meta tag found in %s\", importPrefix, resp.URL)\n\t\t}\n\t\treturn setCache(fetchResult{url: url, imports: imports, err: err})\n\t})\n\tres := resi.(fetchResult)\n\treturn res.url, res.imports, res.err\n}\n\ntype fetchResult struct {\n\turl     *urlpkg.URL\n\timports []metaImport\n\terr     error\n}\n\n// metaImport represents the parsed <meta name=\"go-import\"\n// content=\"prefix vcs reporoot subdir\" /> tags from HTML files.\ntype metaImport struct {\n\tPrefix, VCS, RepoRoot, SubDir string\n}","sourceCodeStart":1150,"sourceCodeEnd":1186,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/go/internal/vcs/vcs.go#L1150-L1186","documentation":"The fetched and parsed page contained zero go-import meta entries — not a parse error (that is 1149), the page tokenized fine but had no matching tags. The %s is the import prefix; the second %s is resp.URL.","triggerScenarios":"The prefix host returns a valid HTML page with no <meta name='go-import'> tags at all, and resp.Err() was nil.","commonSituations":"Asking for a path whose host doesn't serve Go vanity headers; pointing at a plain website; forgot to add go-import meta tags; redirected to a marketing page.","solutions":["Add <meta name='go-import' content='<prefix> <vcs> <repo>'> to the host's HTML","Verify you're hitting the right host (inspect redirects)","Switch to a module proxy if you can't control the host's HTML"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Add the go-import meta tag to every host that serves a Go vanity path","If you can't edit the host, publish the module via a Go proxy (GOPROXY) instead"],"tags":["go","modules","vcs","vanity"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}