mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-16 20:00:03 +02:00
fix go get sub package and add domain on installation to let go get work defaultly (#1518)
* fix go get sub package and add domain on installation to let go get work defaultly * fix import sequence * fix .git problem
This commit is contained in:
parent
42072783c9
commit
f0db3da713
3 changed files with 27 additions and 1 deletions
|
@ -127,7 +127,7 @@ func composeGoGetImport(owner, repo string) string {
|
|||
func earlyResponseForGoGetMeta(ctx *Context) {
|
||||
ctx.PlainText(200, []byte(com.Expand(`<meta name="go-import" content="{GoGetImport} git {CloneLink}">`,
|
||||
map[string]string{
|
||||
"GoGetImport": composeGoGetImport(ctx.Params(":username"), ctx.Params(":reponame")),
|
||||
"GoGetImport": composeGoGetImport(ctx.Params(":username"), strings.TrimSuffix(ctx.Params(":reponame"), ".git")),
|
||||
"CloneLink": models.ComposeHTTPSCloneURL(ctx.Params(":username"), ctx.Params(":reponame")),
|
||||
})))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue