Remove GoGet option from repository and handle it with ?go-get=1 instead
The normal go get protocol is to show the go-import meta tag when ?go-get=1 is appended to the url. This commit implements that behaviour and cleans the go-get option from the repository settings page.
This commit is contained in:
parent
d85366930c
commit
e6fc58a744
8 changed files with 4 additions and 15 deletions
|
@ -8,9 +8,9 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
"path"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
|
||||
|
@ -84,7 +84,6 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
|
|||
ctx.Repo.Repository.Description = form.Description
|
||||
ctx.Repo.Repository.Website = form.Website
|
||||
ctx.Repo.Repository.IsPrivate = form.Private
|
||||
ctx.Repo.Repository.IsGoget = form.GoGet
|
||||
if err := models.UpdateRepository(ctx.Repo.Repository); err != nil {
|
||||
ctx.Handle(404, "UpdateRepository", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue