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
master
Unknwon 2017-04-04 19:29:59 -04:00
parent 37b10666de
commit d05395fe90
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
138 changed files with 275 additions and 275 deletions

View File

@ -7,7 +7,7 @@ watch_all = true
watch_dirs = [
"$WORKDIR/cmd",
"$WORKDIR/models",
"$WORKDIR/modules",
"$WORKDIR/pkg",
"$WORKDIR/routers"
]
watch_exts = [".go"]

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

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 (

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{

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"
)

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 (

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{

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"
)

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"

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"

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

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

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.

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.

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 {

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 (

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})")

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 {

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

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

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) {

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) {

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.

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)

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.

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)

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.

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()

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 {

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"
)
// ___________ .___.__ __ ___________.__.__

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) {

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 (

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() {

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.

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

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)

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 {

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 {

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()

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 {

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.

View File

@ -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 {

View File

@ -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 {

View File

@ -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.

View File

@ -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 {

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"
)
type PullRequest struct {

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()

View File

@ -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 (

View File

@ -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 {

View File

@ -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.

View File

@ -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) {

View File

@ -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.

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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

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 {

View File

@ -8,7 +8,7 @@ import (
"path"
"strings"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/pkg/setting"
)
var (

View File

@ -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 {

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 (

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 (

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 (

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"
)

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 (

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"
)

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"
)

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 {

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"
)

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"
)

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"
)

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"

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.

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

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"
)

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"
)

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"
)

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