Browse Source

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
pull/4248/merge
Unknwon 8 years ago
parent
commit
d05395fe90
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      .bra.toml
  2. 18
      Makefile
  3. 2
      cmd/admin.go
  4. 2
      cmd/backup.go
  5. 4
      cmd/hook.go
  6. 2
      cmd/import.go
  7. 2
      cmd/restore.go
  8. 2
      cmd/serv.go
  9. 12
      cmd/web.go
  10. 2
      gogs.go
  11. 4
      models/action.go
  12. 4
      models/admin.go
  13. 2
      models/attachment.go
  14. 2
      models/comment.go
  15. 6
      models/git_diff.go
  16. 4
      models/issue.go
  17. 2
      models/issue_label.go
  18. 6
      models/issue_mail.go
  19. 4
      models/login_source.go
  20. 2
      models/migrations/migrations.go
  21. 2
      models/migrations/v15.go
  22. 2
      models/migrations/v16.go
  23. 2
      models/milestone.go
  24. 6
      models/mirror.go
  25. 2
      models/models.go
  26. 6
      models/pull.go
  27. 2
      models/release.go
  28. 10
      models/repo.go
  29. 2
      models/repo_branch.go
  30. 4
      models/repo_editor.go
  31. 2
      models/repo_test.go
  32. 6
      models/ssh_key.go
  33. 2
      models/ssh_key_test.go
  34. 2
      models/token.go
  35. 6
      models/user.go
  36. 6
      models/webhook.go
  37. 2
      models/webhook_discord.go
  38. 2
      models/webhook_slack.go
  39. 4
      models/wiki.go
  40. 4
      pkg/auth/auth.go
  41. 0
      pkg/auth/ldap/README.md
  42. 0
      pkg/auth/ldap/ldap.go
  43. 0
      pkg/auth/pam/pam.go
  44. 0
      pkg/auth/pam/pam_stub.go
  45. 0
      pkg/avatar/avatar.go
  46. 0
      pkg/avatar/avatar_test.go
  47. 0
      pkg/base/base.go
  48. 0
      pkg/base/file.go
  49. 2
      pkg/base/tool.go
  50. 0
      pkg/bindata/bindata.go
  51. 4
      pkg/context/api.go
  52. 0
      pkg/context/api_org.go
  53. 4
      pkg/context/auth.go
  54. 8
      pkg/context/context.go
  55. 2
      pkg/context/org.go
  56. 2
      pkg/context/repo.go
  57. 2
      pkg/cron/cron.go
  58. 0
      pkg/form/admin.go
  59. 0
      pkg/form/auth.go
  60. 0
      pkg/form/form.go
  61. 0
      pkg/form/org.go
  62. 0
      pkg/form/repo.go
  63. 0
      pkg/form/user.go
  64. 0
      pkg/httplib/httplib.go
  65. 6
      pkg/mailer/mail.go
  66. 2
      pkg/mailer/mailer.go
  67. 4
      pkg/markup/markdown.go
  68. 4
      pkg/markup/markdown_test.go
  69. 4
      pkg/markup/markup.go
  70. 4
      pkg/markup/markup_test.go
  71. 2
      pkg/markup/sanitizer.go
  72. 2
      pkg/markup/sanitizer_test.go
  73. 0
      pkg/process/manager.go
  74. 0
      pkg/setting/miniwinsvc.go
  75. 4
      pkg/setting/setting.go
  76. 2
      pkg/ssh/ssh.go
  77. 0
      pkg/sync/exclusive_pool.go
  78. 0
      pkg/sync/status_pool.go
  79. 0
      pkg/sync/unique_queue.go
  80. 2
      pkg/template/highlight/highlight.go
  81. 6
      pkg/template/template.go
  82. 0
      pkg/user/user.go
  83. 12
      routers/admin/admin.go
  84. 10
      routers/admin/auths.go
  85. 6
      routers/admin/notice.go
  86. 6
      routers/admin/orgs.go
  87. 6
      routers/admin/repos.go
  88. 10
      routers/admin/users.go
  89. 2
      routers/api/v1/admin/org.go
  90. 2
      routers/api/v1/admin/org_repo.go
  91. 2
      routers/api/v1/admin/org_team.go
  92. 2
      routers/api/v1/admin/repo.go
  93. 6
      routers/api/v1/admin/user.go
  94. 4
      routers/api/v1/api.go
  95. 2
      routers/api/v1/convert/utils.go
  96. 4
      routers/api/v1/misc/markdown.go
  97. 2
      routers/api/v1/org/org.go
  98. 2
      routers/api/v1/org/team.go
  99. 2
      routers/api/v1/repo/branch.go
  100. 2
      routers/api/v1/repo/collaborators.go
  101. Some files were not shown because too many files have changed in this diff Show More

2
.bra.toml

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

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

2
cmd/admin.go

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

2
cmd/backup.go

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

4
cmd/hook.go

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

2
cmd/import.go

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

2
cmd/restore.go

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

2
cmd/serv.go

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

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

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

4
models/action.go

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

4
models/admin.go

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

2
models/attachment.go

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

2
models/comment.go

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

6
models/git_diff.go

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

4
models/issue.go

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

2
models/issue_label.go

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

6
models/issue_mail.go

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

4
models/login_source.go

@ -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
models/migrations/migrations.go

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

2
models/migrations/v15.go

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

2
models/migrations/v16.go

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

2
models/milestone.go

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

6
models/mirror.go

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

2
models/models.go

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

6
models/pull.go

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

2
models/release.go

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

10
models/repo.go

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

2
models/repo_branch.go

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

4
models/repo_editor.go

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

2
models/repo_test.go

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

6
models/ssh_key.go

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

2
models/ssh_key_test.go

@ -11,7 +11,7 @@ import (
. "github.com/smartystreets/goconvey/convey"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/pkg/setting"
)
func init() {

2
models/token.go

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

6
models/user.go

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

6
models/webhook.go

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

2
models/webhook_discord.go

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

2
models/webhook_slack.go

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

4
models/wiki.go

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

4
modules/auth/auth.go → pkg/auth/auth.go

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

0
modules/auth/ldap/README.md → pkg/auth/ldap/README.md

0
modules/auth/ldap/ldap.go → pkg/auth/ldap/ldap.go

0
modules/auth/pam/pam.go → pkg/auth/pam/pam.go

0
modules/auth/pam/pam_stub.go → pkg/auth/pam/pam_stub.go

0
modules/avatar/avatar.go → pkg/avatar/avatar.go

0
modules/avatar/avatar_test.go → pkg/avatar/avatar_test.go

0
modules/base/base.go → pkg/base/base.go

0
modules/base/file.go → pkg/base/file.go

2
modules/base/tool.go → pkg/base/tool.go

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

0
modules/bindata/bindata.go → pkg/bindata/bindata.go

4
modules/context/api.go → pkg/context/api.go

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

0
modules/context/api_org.go → pkg/context/api_org.go

4
modules/context/auth.go → pkg/context/auth.go

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

8
modules/context/context.go → pkg/context/context.go

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

2
modules/context/org.go → pkg/context/org.go

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

2
modules/context/repo.go → pkg/context/repo.go

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

2
modules/cron/cron.go → pkg/cron/cron.go

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

0
modules/form/admin.go → pkg/form/admin.go

0
modules/form/auth.go → pkg/form/auth.go

0
modules/form/form.go → pkg/form/form.go

0
modules/form/org.go → pkg/form/org.go

0
modules/form/repo.go → pkg/form/repo.go

0
modules/form/user.go → pkg/form/user.go

0
modules/httplib/httplib.go → pkg/httplib/httplib.go

6
modules/mailer/mail.go → pkg/mailer/mail.go

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

2
modules/mailer/mailer.go → pkg/mailer/mailer.go

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

4
modules/markup/markdown.go → pkg/markup/markdown.go

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

4
modules/markup/markdown_test.go → pkg/markup/markdown_test.go

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

4
modules/markup/markup.go → pkg/markup/markup.go

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

4
modules/markup/markup_test.go → pkg/markup/markup_test.go

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

2
modules/markup/sanitizer.go → pkg/markup/sanitizer.go

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

2
modules/markup/sanitizer_test.go → pkg/markup/sanitizer_test.go

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

0
modules/process/manager.go → pkg/process/manager.go

0
modules/setting/miniwinsvc.go → pkg/setting/miniwinsvc.go

4
modules/setting/setting.go → pkg/setting/setting.go

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

2
modules/ssh/ssh.go → pkg/ssh/ssh.go

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

0
modules/sync/exclusive_pool.go → pkg/sync/exclusive_pool.go

0
modules/sync/status_pool.go → pkg/sync/status_pool.go

0
modules/sync/unique_queue.go → pkg/sync/unique_queue.go

2
modules/template/highlight/highlight.go → pkg/template/highlight/highlight.go

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

6
modules/template/template.go → pkg/template/template.go

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

0
modules/user/user.go → pkg/user/user.go

12
routers/admin/admin.go

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

10
routers/admin/auths.go

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

6
routers/admin/notice.go

@ -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
routers/admin/orgs.go

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

6
routers/admin/repos.go

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

10
routers/admin/users.go

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

2
routers/api/v1/admin/org.go

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

2
routers/api/v1/admin/org_repo.go

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

2
routers/api/v1/admin/org_team.go

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

2
routers/api/v1/admin/repo.go

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

6
routers/api/v1/admin/user.go

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

4
routers/api/v1/api.go

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

2
routers/api/v1/convert/utils.go

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

4
routers/api/v1/misc/markdown.go

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

2
routers/api/v1/org/org.go

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

2
routers/api/v1/org/team.go

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

2
routers/api/v1/repo/branch.go

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

2
routers/api/v1/repo/collaborators.go

@ -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…
Cancel
Save