Browse Source

repo: fix go-get meta tags (#4832)

The first part in go-import should be the root import path. It
included subpath when 'go get' with a subpath and was not correct.
Unknwon 6 years ago
parent
commit
86931f546f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/context/context.go

+ 1 - 1
pkg/context/context.go

@@ -255,7 +255,7 @@ func Contexter() macaron.Handler {
 	</body>
 </html>
 `, map[string]string{
-				"GoGetImport":    path.Join(setting.Domain, setting.AppSubURL, c.Link),
+				"GoGetImport":    path.Join(setting.Domain, setting.AppSubURL, repo.FullName()),
 				"CloneLink":      models.ComposeHTTPSCloneURL(ownerName, repoName),
 				"GoDocDirectory": prefix + "{/dir}",
 				"GoDocFile":      prefix + "{/dir}/{file}#L{line}",