mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
go get
This commit is contained in:
@@ -197,15 +197,3 @@ func DiffLineTypeToStr(diffType int) string {
|
||||
}
|
||||
return "same"
|
||||
}
|
||||
|
||||
const (
|
||||
TPL_GO_GET_META = `<meta name="go-import" content="%s git %s">`
|
||||
)
|
||||
|
||||
func GetGoGetMetaList() []byte {
|
||||
buf := bytes.NewBuffer([]byte(""))
|
||||
for meta := range GoGetMetas {
|
||||
buf.WriteString(fmt.Sprintf(TPL_GO_GET_META, Domain, meta))
|
||||
}
|
||||
return buf.Bytes()
|
||||
}
|
||||
|
@@ -135,7 +135,8 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
|
||||
ctx.Data["CloneLink"] = ctx.Repo.CloneLink
|
||||
|
||||
if ctx.Repo.Repository.IsGoget {
|
||||
ctx.Data["GoGetLink"] = strings.TrimSuffix(ctx.Repo.CloneLink.HTTPS, ".git")
|
||||
ctx.Data["GoGetLink"] = fmt.Sprintf("%s%s/%s", base.AppUrl, user.LowerName, repo.LowerName)
|
||||
ctx.Data["GoGetImport"] = fmt.Sprintf("%s/%s/%s", base.Domain, user.LowerName, repo.LowerName)
|
||||
}
|
||||
|
||||
// when repo is bare, not valid branch
|
||||
|
Reference in New Issue
Block a user