mirror of https://github.com/gogs/gogs.git
Refactoring: rename modules -> pkg
Reasons to change: 1. Shorter than 'modules' 2. More generally used by other Go projects 3. Corresponds to the naming of '$GOPATH/pkg' directorypull/4248/merge
parent
37b10666de
commit
d05395fe90
|
@ -7,7 +7,7 @@ watch_all = true
|
|||
watch_dirs = [
|
||||
"$WORKDIR/cmd",
|
||||
"$WORKDIR/models",
|
||||
"$WORKDIR/modules",
|
||||
"$WORKDIR/pkg",
|
||||
"$WORKDIR/routers"
|
||||
]
|
||||
watch_exts = [".go"]
|
||||
|
|
18
Makefile
18
Makefile
|
@ -1,9 +1,9 @@
|
|||
LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')"
|
||||
LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildGitHash=$(shell git rev-parse HEAD)"
|
||||
LDFLAGS += -X "github.com/gogits/gogs/pkg/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')"
|
||||
LDFLAGS += -X "github.com/gogits/gogs/pkg/setting.BuildGitHash=$(shell git rev-parse HEAD)"
|
||||
|
||||
DATA_FILES := $(shell find conf | sed 's/ /\\ /g')
|
||||
LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
|
||||
GENERATED := modules/bindata/bindata.go public/css/gogs.css
|
||||
GENERATED := pkg/bindata/bindata.go public/css/gogs.css
|
||||
|
||||
OS := $(shell uname)
|
||||
|
||||
|
@ -27,7 +27,7 @@ dist: release
|
|||
|
||||
govet:
|
||||
$(GOVET) gogs.go
|
||||
$(GOVET) models modules routers
|
||||
$(GOVET) models pkg routers
|
||||
|
||||
build: $(GENERATED)
|
||||
go install $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
|
||||
|
@ -50,9 +50,9 @@ pack:
|
|||
|
||||
release: build pack
|
||||
|
||||
bindata: modules/bindata/bindata.go
|
||||
bindata: pkg/bindata/bindata.go
|
||||
|
||||
modules/bindata/bindata.go: $(DATA_FILES)
|
||||
pkg/bindata/bindata.go: $(DATA_FILES)
|
||||
go-bindata -o=$@ -ignore="\\.DS_Store|README.md|TRANSLATORS" -pkg=bindata conf/...
|
||||
|
||||
less: public/css/gogs.css
|
||||
|
@ -70,11 +70,11 @@ test:
|
|||
go test -cover -race ./...
|
||||
|
||||
fixme:
|
||||
grep -rnw "FIXME" cmd routers models modules
|
||||
grep -rnw "FIXME" cmd routers models pkg
|
||||
|
||||
todo:
|
||||
grep -rnw "TODO" cmd routers models modules
|
||||
grep -rnw "TODO" cmd routers models pkg
|
||||
|
||||
# Legacy code should be remove by the time of release
|
||||
legacy:
|
||||
grep -rnw "LEGACY" cmd routers models modules
|
||||
grep -rnw "LEGACY" cmd routers models pkg
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/urfave/cli"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
"gopkg.in/ini.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var Backup = cli.Command{
|
||||
|
|
|
@ -21,8 +21,8 @@ import (
|
|||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/httplib"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/httplib"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
http "github.com/gogits/gogs/routers/repo"
|
||||
)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
"github.com/Unknwon/com"
|
||||
"github.com/urfave/cli"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
"gopkg.in/ini.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var Restore = cli.Command{
|
||||
|
@ -24,9 +24,9 @@ var Restore = cli.Command{
|
|||
Usage: "Restore files and database from backup",
|
||||
Description: `Restore imports all related files and database from a backup archive.
|
||||
The backup version must lower or equal to current Gogs version. You can also import
|
||||
backup from other database engines, which is useful for database migrating.
|
||||
backup from other database engines, which is useful for database migrating.
|
||||
|
||||
If corresponding files or database tables are not presented in the archive, they will
|
||||
If corresponding files or database tables are not presented in the archive, they will
|
||||
be skipped and remian unchanged.`,
|
||||
Action: runRestore,
|
||||
Flags: []cli.Flag{
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
http "github.com/gogits/gogs/routers/repo"
|
||||
)
|
||||
|
||||
|
|
12
cmd/web.go
12
cmd/web.go
|
@ -30,12 +30,12 @@ import (
|
|||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/bindata"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/form"
|
||||
"github.com/gogits/gogs/modules/mailer"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/template"
|
||||
"github.com/gogits/gogs/pkg/bindata"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/form"
|
||||
"github.com/gogits/gogs/pkg/mailer"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/template"
|
||||
"github.com/gogits/gogs/routers"
|
||||
"github.com/gogits/gogs/routers/admin"
|
||||
apiv1 "github.com/gogits/gogs/routers/api/v1"
|
||||
|
|
2
gogs.go
2
gogs.go
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/urfave/cli"
|
||||
|
||||
"github.com/gogits/gogs/cmd"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.11.2.0404"
|
||||
|
|
|
@ -21,8 +21,8 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type ActionType int
|
||||
|
|
|
@ -15,8 +15,8 @@ import (
|
|||
"github.com/go-xorm/xorm"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type NoticeType int
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
"github.com/go-xorm/xorm"
|
||||
gouuid "github.com/satori/go.uuid"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Attachment represent a attachment of issue/comment/release.
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
)
|
||||
|
||||
// CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.
|
||||
|
|
|
@ -17,9 +17,9 @@ import (
|
|||
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/template/highlight"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/template/highlight"
|
||||
)
|
||||
|
||||
type DiffSection struct {
|
||||
|
|
|
@ -16,8 +16,8 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
)
|
||||
|
||||
var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})")
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
"github.com/Unknwon/com"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/mailer"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/mailer"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func (issue *Issue) MailSubject() string {
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/auth/ldap"
|
||||
"github.com/gogits/gogs/modules/auth/pam"
|
||||
"github.com/gogits/gogs/pkg/auth/ldap"
|
||||
"github.com/gogits/gogs/pkg/auth/pam"
|
||||
)
|
||||
|
||||
type LoginType int
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/go-xorm/xorm"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
)
|
||||
|
||||
const _MIN_DB_VER = 10
|
||||
|
@ -105,7 +105,7 @@ Please save following instructions to somewhere and start working:
|
|||
Once finished downloading,
|
||||
|
||||
1. Extract the archive and to upgrade steps as usual.
|
||||
2. Run it once. To verify, you should see some migration traces.
|
||||
2. Run it once. To verify, you should see some migration traces.
|
||||
3. Once it starts web server successfully, stop it.
|
||||
4. Now it's time to put back the release archive you originally intent to upgrade.
|
||||
5. Enjoy!
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
"github.com/go-xorm/xorm"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func generateAndMigrateGitHooks(x *xorm.Engine) (err error) {
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func updateRepositorySizes(x *xorm.Engine) (err error) {
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Milestone represents a milestone of repository.
|
||||
|
|
|
@ -17,9 +17,9 @@ import (
|
|||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var MirrorQueue = sync.NewUniqueQueue(setting.Repository.MirrorQueueLength)
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models/migrations"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Engine represents a xorm engine or session.
|
||||
|
|
|
@ -19,9 +19,9 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength)
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
)
|
||||
|
||||
// Release represents a release of repository.
|
||||
|
|
|
@ -27,11 +27,11 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/bindata"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/bindata"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var repoWorkingPool = sync.NewExclusivePool()
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/Unknwon/com"
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
)
|
||||
|
||||
type Branch struct {
|
||||
|
|
|
@ -21,8 +21,8 @@ import (
|
|||
|
||||
git "github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// ___________ .___.__ __ ___________.__.__
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
)
|
||||
|
||||
func TestRepo(t *testing.T) {
|
||||
|
|
|
@ -23,9 +23,9 @@ import (
|
|||
"golang.org/x/crypto/ssh"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/go-xorm/xorm"
|
||||
gouuid "github.com/satori/go.uuid"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
)
|
||||
|
||||
// AccessToken represents a personal access token.
|
||||
|
|
|
@ -30,9 +30,9 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/avatar"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/avatar"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type UserType int
|
||||
|
|
|
@ -22,9 +22,9 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/httplib"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/httplib"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var HookQueue = sync.NewUniqueQueue(setting.Webhook.QueueLength)
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/gogits/git-module"
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type DiscordEmbedFooterObject struct {
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/gogits/git-module"
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type SlackMeta struct {
|
||||
|
|
|
@ -17,8 +17,8 @@ import (
|
|||
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var wikiWorkingPool = sync.NewExclusivePool()
|
||||
|
|
|
@ -15,8 +15,8 @@ import (
|
|||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func IsAPIPath(url string) bool {
|
|
@ -24,7 +24,7 @@ import (
|
|||
|
||||
"github.com/gogits/chardet"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// EncodeMD5 encodes string to md5 hex value.
|
|
@ -12,8 +12,8 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type APIContext struct {
|
|
@ -10,8 +10,8 @@ import (
|
|||
"github.com/go-macaron/csrf"
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/auth"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/auth"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type ToggleOptions struct {
|
|
@ -20,10 +20,10 @@ import (
|
|||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/auth"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/form"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/auth"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/form"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Context represents context of a request.
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type Organization struct {
|
|
@ -18,7 +18,7 @@ import (
|
|||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type PullRequest struct {
|
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/gogits/cron"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var c = cron.New()
|
|
@ -12,9 +12,9 @@ import (
|
|||
"gopkg.in/gomail.v2"
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const (
|
|
@ -18,7 +18,7 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
"gopkg.in/gomail.v2"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type Message struct {
|
|
@ -14,8 +14,8 @@ import (
|
|||
|
||||
"github.com/russross/blackfriday"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// IsMarkdownFile reports whether name looks like a Markdown file based on its extension.
|
|
@ -12,8 +12,8 @@ import (
|
|||
"github.com/russross/blackfriday"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
. "github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func Test_IsMarkdownFile(t *testing.T) {
|
|
@ -14,8 +14,8 @@ import (
|
|||
"github.com/Unknwon/com"
|
||||
"golang.org/x/net/html"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// IsReadmeFile reports whether name looks like a README file based on its extension.
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
. "github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func Test_IsReadmeFile(t *testing.T) {
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "github.com/gogits/gogs/modules/markup"
|
||||
. "github.com/gogits/gogs/pkg/markup"
|
||||
)
|
||||
|
||||
func Test_Sanitizer(t *testing.T) {
|
|
@ -26,8 +26,8 @@ import (
|
|||
|
||||
"github.com/gogits/go-libravatar"
|
||||
|
||||
"github.com/gogits/gogs/modules/bindata"
|
||||
"github.com/gogits/gogs/modules/user"
|
||||
"github.com/gogits/gogs/pkg/bindata"
|
||||
"github.com/gogits/gogs/pkg/user"
|
||||
)
|
||||
|
||||
type Scheme string
|
|
@ -19,7 +19,7 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func cleanCommand(cmd string) string {
|
|
@ -8,7 +8,7 @@ import (
|
|||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var (
|
|
@ -22,9 +22,9 @@ import (
|
|||
"gopkg.in/editorconfig/editorconfig-core-go.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func NewFuncMap() []template.FuncMap {
|
|
@ -15,12 +15,12 @@ import (
|
|||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/cron"
|
||||
"github.com/gogits/gogs/modules/mailer"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/cron"
|
||||
"github.com/gogits/gogs/pkg/mailer"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -12,11 +12,11 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/auth/ldap"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/form"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/auth/ldap"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/form"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -6,9 +6,9 @@ package admin
|
|||
|
||||
import (
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/routers"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -11,11 +11,11 @@ import (
|
|||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/form"
|
||||
"github.com/gogits/gogs/modules/mailer"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/base"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/form"
|
||||
"github.com/gogits/gogs/pkg/mailer"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/routers"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/routers/api/v1/convert"
|
||||
"github.com/gogits/gogs/routers/api/v1/user"
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ package admin
|
|||
import (
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
)
|
||||
|
||||
func GetRepositoryByParams(ctx *context.APIContext) *models.Repository {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/routers/api/v1/convert"
|
||||
"github.com/gogits/gogs/routers/api/v1/user"
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ package admin
|
|||
import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/routers/api/v1/repo"
|
||||
"github.com/gogits/gogs/routers/api/v1/user"
|
||||
)
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/mailer"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/mailer"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/routers/api/v1/user"
|
||||
)
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/form"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/form"
|
||||
"github.com/gogits/gogs/routers/api/v1/admin"
|
||||
"github.com/gogits/gogs/routers/api/v1/misc"
|
||||
"github.com/gogits/gogs/routers/api/v1/org"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
package convert
|
||||
|
||||
import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// ToCorrectPageSize makes sure page size is in allowed range.
|
||||
|
|
|
@ -7,8 +7,8 @@ package misc
|
|||
import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
)
|
||||
|
||||
// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/routers/api/v1/convert"
|
||||
"github.com/gogits/gogs/routers/api/v1/user"
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ package org
|
|||
import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/routers/api/v1/convert"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/routers/api/v1/convert"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
)
|
||||
|
||||
func ListCollaborators(ctx *context.APIContext) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue