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' directory
This commit is contained in:
Unknwon
2017-04-04 19:29:59 -04:00
parent 37b10666de
commit d05395fe90
138 changed files with 275 additions and 275 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ watch_all = true
watch_dirs = [
"$WORKDIR/cmd",
"$WORKDIR/models",
"$WORKDIR/modules",
"$WORKDIR/pkg",
"$WORKDIR/routers"
]
watch_exts = [".go"]
+9 -9
View File
@@ -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
+1 -1
View File
@@ -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 (
+1 -1
View File
@@ -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{
+2 -2
View File
@@ -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"
)
+1 -1
View File
@@ -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 (
+3 -3
View File
@@ -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{
+1 -1
View File
@@ -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"
)
+6 -6
View File
@@ -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"
+1 -1
View File
@@ -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"
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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.
+3 -3
View File
@@ -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 {
+2 -2
View File
@@ -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 (
+1 -1
View File
@@ -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})")
+3 -3
View File
@@ -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 {
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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!
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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.
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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.
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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.
+5 -5
View File
@@ -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()
+1 -1
View File
@@ -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 {
+2 -2
View File
@@ -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"
)
// ___________ .___.__ __ ___________.__.__
+1 -1
View File
@@ -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) {
+3 -3
View File
@@ -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 (
+1 -1
View File
@@ -11,7 +11,7 @@ import (
. "github.com/smartystreets/goconvey/convey"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/pkg/setting"
)
func init() {
+1 -1
View File
@@ -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.
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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 {
+2 -2
View File
@@ -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()
+2 -2
View File
@@ -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 {
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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 {
+6 -6
View File
@@ -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 (
+5 -5
View File
@@ -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 (
+3 -3
View File
@@ -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 (
+3 -3
View File
@@ -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"
)
+3 -3
View File
@@ -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 (
+5 -5
View File
@@ -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"
)
+1 -1
View File
@@ -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"
)
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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"
)
+1 -1
View File
@@ -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"
)
+3 -3
View File
@@ -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"
)
+2 -2
View File
@@ -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"
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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"
)
+1 -1
View File
@@ -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"
)
+1 -1
View File
@@ -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"
)
+1 -1
View File
@@ -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