summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorTamal Saha <tamal@appscode.com>2019-08-23 09:40:30 -0700
committertechknowlogick <techknowlogick@gitea.io>2019-08-23 12:40:29 -0400
commit171b3598778a1ecd0a921c71ed6755bfef68f7f0 (patch)
tree02857629ef9e8e26ee0ee559153f803f77b588b7 /modules
parentca6fb004ac50fc924861112403895d637c6a2d1d (diff)
downloadgitea-171b3598778a1ecd0a921c71ed6755bfef68f7f0.tar.gz
gitea-171b3598778a1ecd0a921c71ed6755bfef68f7f0.zip
Use gitea forked macaron (#7933)
Signed-off-by: Tamal Saha <tamal@appscode.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/admin.go5
-rw-r--r--modules/auth/auth.go12
-rw-r--r--modules/auth/auth_form.go4
-rw-r--r--modules/auth/openid/openid.go3
-rw-r--r--modules/auth/org.go4
-rw-r--r--modules/auth/repo_branch_form.go4
-rw-r--r--modules/auth/repo_form.go6
-rw-r--r--modules/auth/repo_form_test.go1
-rw-r--r--modules/auth/user_form.go4
-rw-r--r--modules/auth/user_form_auth_openid.go4
-rw-r--r--modules/base/tool.go2
-rw-r--r--modules/cache/cache.go2
-rw-r--r--modules/context/api.go5
-rw-r--r--modules/context/auth.go5
-rw-r--r--modules/context/context.go13
-rw-r--r--modules/context/org.go3
-rw-r--r--modules/context/pagination.go2
-rw-r--r--modules/context/panic.go3
-rw-r--r--modules/context/permission.go2
-rw-r--r--modules/context/repo.go4
-rw-r--r--modules/git/hook.go2
-rw-r--r--modules/git/repo.go2
-rw-r--r--modules/git/repo_commitgraph.go1
-rw-r--r--modules/gzip/gzip.go2
-rw-r--r--modules/gzip/gzip_test.go2
-rw-r--r--modules/indexer/issues/queue_disk.go1
-rw-r--r--modules/indexer/issues/queue_redis.go1
-rw-r--r--modules/lfs/server.go2
-rw-r--r--modules/markup/html.go2
-rw-r--r--modules/options/dynamic.go3
-rw-r--r--modules/options/static.go3
-rw-r--r--modules/public/dynamic.go2
-rw-r--r--modules/public/public.go3
-rw-r--r--modules/public/static.go2
-rw-r--r--modules/repofiles/file_test.go2
-rw-r--r--modules/session/memory.go8
-rw-r--r--modules/session/virtual.go20
-rw-r--r--modules/setting/cache.go4
-rw-r--r--modules/setting/cors.go4
-rw-r--r--modules/setting/mailer.go1
-rw-r--r--modules/setting/repository.go3
-rw-r--r--modules/setting/session.go2
-rw-r--r--modules/setting/setting.go4
-rw-r--r--modules/ssh/ssh.go2
-rw-r--r--modules/sync/unique_queue.go2
-rw-r--r--modules/templates/dynamic.go5
-rw-r--r--modules/templates/static.go5
-rw-r--r--modules/test/context_tests.go4
-rw-r--r--modules/timeutil/since.go2
-rw-r--r--modules/timeutil/since_test.go4
-rw-r--r--modules/validation/binding.go2
-rw-r--r--modules/validation/binding_test.go4
-rw-r--r--modules/validation/helpers_test.go4
-rw-r--r--modules/validation/refname_test.go2
-rw-r--r--modules/validation/validurl_test.go2
55 files changed, 108 insertions, 94 deletions
diff --git a/modules/auth/admin.go b/modules/auth/admin.go
index 8f8dd8f22a..6e225891dd 100644
--- a/modules/auth/admin.go
+++ b/modules/auth/admin.go
@@ -5,9 +5,8 @@
package auth
import (
- "gopkg.in/macaron.v1"
-
- "github.com/go-macaron/binding"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
)
// AdminCreateUserForm form for admin to create user
diff --git a/modules/auth/auth.go b/modules/auth/auth.go
index 1013628073..74a596e8ef 100644
--- a/modules/auth/auth.go
+++ b/modules/auth/auth.go
@@ -10,18 +10,18 @@ import (
"strings"
"time"
- "github.com/Unknwon/com"
- "github.com/go-macaron/binding"
- "github.com/go-macaron/session"
- gouuid "github.com/satori/go.uuid"
- "gopkg.in/macaron.v1"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/validation"
+
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
+ "gitea.com/macaron/session"
+ gouuid "github.com/satori/go.uuid"
+ "github.com/unknwon/com"
)
// IsAPIPath if URL is an api path
diff --git a/modules/auth/auth_form.go b/modules/auth/auth_form.go
index e44ef58f8e..358472a385 100644
--- a/modules/auth/auth_form.go
+++ b/modules/auth/auth_form.go
@@ -5,8 +5,8 @@
package auth
import (
- "github.com/go-macaron/binding"
- "gopkg.in/macaron.v1"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
)
// AuthenticationForm form for authentication
diff --git a/modules/auth/openid/openid.go b/modules/auth/openid/openid.go
index ffe0aba2b6..40f38c2d2e 100644
--- a/modules/auth/openid/openid.go
+++ b/modules/auth/openid/openid.go
@@ -5,8 +5,9 @@
package openid
import (
- "github.com/yohcop/openid-go"
"time"
+
+ "github.com/yohcop/openid-go"
)
// For the demo, we use in-memory infinite storage nonce and discovery
diff --git a/modules/auth/org.go b/modules/auth/org.go
index d51ab75d3a..367468e587 100644
--- a/modules/auth/org.go
+++ b/modules/auth/org.go
@@ -9,8 +9,8 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/structs"
- "github.com/go-macaron/binding"
- "gopkg.in/macaron.v1"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
)
// ________ .__ __ .__
diff --git a/modules/auth/repo_branch_form.go b/modules/auth/repo_branch_form.go
index 57e63741aa..a4baabe354 100644
--- a/modules/auth/repo_branch_form.go
+++ b/modules/auth/repo_branch_form.go
@@ -5,8 +5,8 @@
package auth
import (
- "github.com/go-macaron/binding"
- macaron "gopkg.in/macaron.v1"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
)
// NewBranchForm form for creating a new branch
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index cdac210dde..bb9be70e87 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -13,9 +13,9 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers/utils"
- "github.com/Unknwon/com"
- "github.com/go-macaron/binding"
- macaron "gopkg.in/macaron.v1"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
+ "github.com/unknwon/com"
)
// _______________________________________ _________.______________________ _______________.___.
diff --git a/modules/auth/repo_form_test.go b/modules/auth/repo_form_test.go
index a3369b006e..6bad5d50ba 100644
--- a/modules/auth/repo_form_test.go
+++ b/modules/auth/repo_form_test.go
@@ -8,6 +8,7 @@ import (
"testing"
"code.gitea.io/gitea/modules/setting"
+
"github.com/stretchr/testify/assert"
)
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go
index c117d038be..8ceb961d24 100644
--- a/modules/auth/user_form.go
+++ b/modules/auth/user_form.go
@@ -11,8 +11,8 @@ import (
"code.gitea.io/gitea/modules/setting"
- "github.com/go-macaron/binding"
- macaron "gopkg.in/macaron.v1"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
)
// InstallForm form for installation page
diff --git a/modules/auth/user_form_auth_openid.go b/modules/auth/user_form_auth_openid.go
index 275850d09a..b355825483 100644
--- a/modules/auth/user_form_auth_openid.go
+++ b/modules/auth/user_form_auth_openid.go
@@ -5,8 +5,8 @@
package auth
import (
- "github.com/go-macaron/binding"
- "gopkg.in/macaron.v1"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
)
// SignInOpenIDForm form for signing in with OpenID
diff --git a/modules/base/tool.go b/modules/base/tool.go
index 43678979a5..60d96d57e3 100644
--- a/modules/base/tool.go
+++ b/modules/base/tool.go
@@ -29,7 +29,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/com"
+ "github.com/unknwon/com"
)
// EncodeMD5 encodes string to md5 hex value.
diff --git a/modules/cache/cache.go b/modules/cache/cache.go
index a7412f109f..ceb5772fcf 100644
--- a/modules/cache/cache.go
+++ b/modules/cache/cache.go
@@ -10,7 +10,7 @@ import (
"code.gitea.io/gitea/modules/setting"
- mc "github.com/go-macaron/cache"
+ mc "gitea.com/macaron/cache"
)
var conn mc.Cache
diff --git a/modules/context/api.go b/modules/context/api.go
index 0b2f81fd64..024ae487f1 100644
--- a/modules/context/api.go
+++ b/modules/context/api.go
@@ -10,14 +10,13 @@ import (
"net/url"
"strings"
- "github.com/go-macaron/csrf"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
- "gopkg.in/macaron.v1"
+ "gitea.com/macaron/csrf"
+ "gitea.com/macaron/macaron"
)
// APIContext is a specific macaron context for API service
diff --git a/modules/context/auth.go b/modules/context/auth.go
index 772403bda9..be63720035 100644
--- a/modules/context/auth.go
+++ b/modules/context/auth.go
@@ -10,8 +10,9 @@ import (
"code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
- "github.com/go-macaron/csrf"
- macaron "gopkg.in/macaron.v1"
+
+ "gitea.com/macaron/csrf"
+ "gitea.com/macaron/macaron"
)
// ToggleOptions contains required or check options
diff --git a/modules/context/context.go b/modules/context/context.go
index b7c77ac460..e89b2e25c4 100644
--- a/modules/context/context.go
+++ b/modules/context/context.go
@@ -20,12 +20,13 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
- "github.com/Unknwon/com"
- "github.com/go-macaron/cache"
- "github.com/go-macaron/csrf"
- "github.com/go-macaron/i18n"
- "github.com/go-macaron/session"
- "gopkg.in/macaron.v1"
+
+ "gitea.com/macaron/cache"
+ "gitea.com/macaron/csrf"
+ "gitea.com/macaron/i18n"
+ "gitea.com/macaron/macaron"
+ "gitea.com/macaron/session"
+ "github.com/unknwon/com"
)
// Context represents context of a request.
diff --git a/modules/context/org.go b/modules/context/org.go
index 12d5dbfbf9..4867474334 100644
--- a/modules/context/org.go
+++ b/modules/context/org.go
@@ -9,7 +9,8 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"
- macaron "gopkg.in/macaron.v1"
+
+ "gitea.com/macaron/macaron"
)
// Organization contains organization context
diff --git a/modules/context/pagination.go b/modules/context/pagination.go
index 390b4dbdd7..9a6ad0b5c4 100644
--- a/modules/context/pagination.go
+++ b/modules/context/pagination.go
@@ -10,7 +10,7 @@ import (
"net/url"
"strings"
- "github.com/Unknwon/paginater"
+ "github.com/unknwon/paginater"
)
// Pagination provides a pagination via Paginater and additional configurations for the link params used in rendering
diff --git a/modules/context/panic.go b/modules/context/panic.go
index c251337164..e5ef233629 100644
--- a/modules/context/panic.go
+++ b/modules/context/panic.go
@@ -20,7 +20,8 @@ import (
"fmt"
"code.gitea.io/gitea/modules/log"
- macaron "gopkg.in/macaron.v1"
+
+ "gitea.com/macaron/macaron"
)
// Recovery returns a middleware that recovers from any panics and writes a 500 and a log if so.
diff --git a/modules/context/permission.go b/modules/context/permission.go
index 6ac935686b..f2adf896f9 100644
--- a/modules/context/permission.go
+++ b/modules/context/permission.go
@@ -8,7 +8,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/log"
- macaron "gopkg.in/macaron.v1"
+ "gitea.com/macaron/macaron"
)
// RequireRepoAdmin returns a macaron middleware for requiring repository admin permission
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 096f3c0a5d..1499145f74 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -18,9 +18,9 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/com"
+ "gitea.com/macaron/macaron"
+ "github.com/unknwon/com"
"gopkg.in/editorconfig/editorconfig-core-go.v1"
- "gopkg.in/macaron.v1"
)
// PullRequest contains informations to make a pull request
diff --git a/modules/git/hook.go b/modules/git/hook.go
index 18c00b5838..e966591668 100644
--- a/modules/git/hook.go
+++ b/modules/git/hook.go
@@ -12,7 +12,7 @@ import (
"path/filepath"
"strings"
- "github.com/Unknwon/com"
+ "github.com/unknwon/com"
)
// hookNames is a list of Git server hooks' name that are supported.
diff --git a/modules/git/repo.go b/modules/git/repo.go
index 28e54a1bbc..1a9112132f 100644
--- a/modules/git/repo.go
+++ b/modules/git/repo.go
@@ -17,7 +17,7 @@ import (
"strings"
"time"
- "github.com/Unknwon/com"
+ "github.com/unknwon/com"
"gopkg.in/src-d/go-billy.v4/osfs"
gogit "gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing/cache"
diff --git a/modules/git/repo_commitgraph.go b/modules/git/repo_commitgraph.go
index 52263852dc..f3a45d8e6e 100644
--- a/modules/git/repo_commitgraph.go
+++ b/modules/git/repo_commitgraph.go
@@ -10,6 +10,7 @@ import (
"path"
gitealog "code.gitea.io/gitea/modules/log"
+
"gopkg.in/src-d/go-git.v4/plumbing/format/commitgraph"
cgobject "gopkg.in/src-d/go-git.v4/plumbing/object/commitgraph"
)
diff --git a/modules/gzip/gzip.go b/modules/gzip/gzip.go
index 0d10071830..d139b09e1c 100644
--- a/modules/gzip/gzip.go
+++ b/modules/gzip/gzip.go
@@ -15,8 +15,8 @@ import (
"strings"
"sync"
+ "gitea.com/macaron/macaron"
"github.com/klauspost/compress/gzip"
- "gopkg.in/macaron.v1"
)
const (
diff --git a/modules/gzip/gzip_test.go b/modules/gzip/gzip_test.go
index d131e240af..5fc56cc7f0 100644
--- a/modules/gzip/gzip_test.go
+++ b/modules/gzip/gzip_test.go
@@ -12,9 +12,9 @@ import (
"net/http/httptest"
"testing"
+ "gitea.com/macaron/macaron"
gzipp "github.com/klauspost/compress/gzip"
"github.com/stretchr/testify/assert"
- macaron "gopkg.in/macaron.v1"
)
func setup(sampleResponse []byte) (*macaron.Macaron, *[]byte) {
diff --git a/modules/indexer/issues/queue_disk.go b/modules/indexer/issues/queue_disk.go
index e5ac2a7981..b127f8d269 100644
--- a/modules/indexer/issues/queue_disk.go
+++ b/modules/indexer/issues/queue_disk.go
@@ -9,6 +9,7 @@ import (
"time"
"code.gitea.io/gitea/modules/log"
+
"github.com/lunny/levelqueue"
)
diff --git a/modules/indexer/issues/queue_redis.go b/modules/indexer/issues/queue_redis.go
index aeccd7920c..0344d3c87a 100644
--- a/modules/indexer/issues/queue_redis.go
+++ b/modules/indexer/issues/queue_redis.go
@@ -12,6 +12,7 @@ import (
"time"
"code.gitea.io/gitea/modules/log"
+
"github.com/go-redis/redis"
)
diff --git a/modules/lfs/server.go b/modules/lfs/server.go
index bf5355acfc..652610acf4 100644
--- a/modules/lfs/server.go
+++ b/modules/lfs/server.go
@@ -17,8 +17,8 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
+ "gitea.com/macaron/macaron"
"github.com/dgrijalva/jwt-go"
- "gopkg.in/macaron.v1"
)
const (
diff --git a/modules/markup/html.go b/modules/markup/html.go
index 28533cdd3f..1ffb7da24c 100644
--- a/modules/markup/html.go
+++ b/modules/markup/html.go
@@ -18,7 +18,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
- "github.com/Unknwon/com"
+ "github.com/unknwon/com"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
"mvdan.cc/xurls/v2"
diff --git a/modules/options/dynamic.go b/modules/options/dynamic.go
index c56d098a2e..7de7cfbd61 100644
--- a/modules/options/dynamic.go
+++ b/modules/options/dynamic.go
@@ -12,7 +12,8 @@ import (
"path"
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/com"
+
+ "github.com/unknwon/com"
)
var (
diff --git a/modules/options/static.go b/modules/options/static.go
index 629901f740..1cf841ebb1 100644
--- a/modules/options/static.go
+++ b/modules/options/static.go
@@ -12,7 +12,8 @@ import (
"path"
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/com"
+
+ "github.com/unknwon/com"
)
var (
diff --git a/modules/public/dynamic.go b/modules/public/dynamic.go
index 282db44970..07f83e1f6a 100644
--- a/modules/public/dynamic.go
+++ b/modules/public/dynamic.go
@@ -7,7 +7,7 @@
package public
import (
- "gopkg.in/macaron.v1"
+ "gitea.com/macaron/macaron"
)
// Static implements the macaron static handler for serving assets.
diff --git a/modules/public/public.go b/modules/public/public.go
index df7027572b..c16c8e0009 100644
--- a/modules/public/public.go
+++ b/modules/public/public.go
@@ -14,7 +14,8 @@ import (
"time"
"code.gitea.io/gitea/modules/setting"
- "gopkg.in/macaron.v1"
+
+ "gitea.com/macaron/macaron"
)
//go:generate go run -mod=vendor main.go
diff --git a/modules/public/static.go b/modules/public/static.go
index 054b9a806c..3e8865c3f9 100644
--- a/modules/public/static.go
+++ b/modules/public/static.go
@@ -7,7 +7,7 @@
package public
import (
- "gopkg.in/macaron.v1"
+ "gitea.com/macaron/macaron"
)
// Static implements the macaron static handler for serving assets.
diff --git a/modules/repofiles/file_test.go b/modules/repofiles/file_test.go
index 00feb93fff..7c45139dd9 100644
--- a/modules/repofiles/file_test.go
+++ b/modules/repofiles/file_test.go
@@ -5,11 +5,11 @@
package repofiles
import (
- "code.gitea.io/gitea/modules/setting"
"testing"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/git"
+ "code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/test"
diff --git a/modules/session/memory.go b/modules/session/memory.go
index 9c493bfe15..4f72feac9b 100644
--- a/modules/session/memory.go
+++ b/modules/session/memory.go
@@ -22,7 +22,7 @@ import (
"sync"
"time"
- "github.com/go-macaron/session"
+ "gitea.com/macaron/session"
)
// MemStore represents a in-memory session store implementation.
@@ -148,8 +148,8 @@ func (p *MemProvider) Exist(sid string) bool {
return ok
}
-// Destory deletes a session by session ID.
-func (p *MemProvider) Destory(sid string) error {
+// Destroy deletes a session by session ID.
+func (p *MemProvider) Destroy(sid string) error {
p.lock.Lock()
defer p.lock.Unlock()
@@ -174,7 +174,7 @@ func (p *MemProvider) Regenerate(oldsid, sid string) (session.RawStore, error) {
return nil, err
}
- if err = p.Destory(oldsid); err != nil {
+ if err = p.Destroy(oldsid); err != nil {
return nil, err
}
diff --git a/modules/session/virtual.go b/modules/session/virtual.go
index b8ddd2f71b..027960a289 100644
--- a/modules/session/virtual.go
+++ b/modules/session/virtual.go
@@ -10,13 +10,13 @@ import (
"fmt"
"sync"
- "github.com/go-macaron/session"
- couchbase "github.com/go-macaron/session/couchbase"
- memcache "github.com/go-macaron/session/memcache"
- mysql "github.com/go-macaron/session/mysql"
- nodb "github.com/go-macaron/session/nodb"
- postgres "github.com/go-macaron/session/postgres"
- redis "github.com/go-macaron/session/redis"
+ "gitea.com/macaron/session"
+ couchbase "gitea.com/macaron/session/couchbase"
+ memcache "gitea.com/macaron/session/memcache"
+ mysql "gitea.com/macaron/session/mysql"
+ nodb "gitea.com/macaron/session/nodb"
+ postgres "gitea.com/macaron/session/postgres"
+ redis "gitea.com/macaron/session/redis"
)
// VirtualSessionProvider represents a shadowed session provider implementation.
@@ -75,11 +75,11 @@ func (o *VirtualSessionProvider) Exist(sid string) bool {
return true
}
-// Destory deletes a session by session ID.
-func (o *VirtualSessionProvider) Destory(sid string) error {
+// Destroy deletes a session by session ID.
+func (o *VirtualSessionProvider) Destroy(sid string) error {
o.lock.Lock()
defer o.lock.Unlock()
- return o.provider.Destory(sid)
+ return o.provider.Destroy(sid)
}
// Regenerate regenerates a session store from old session ID to new one.
diff --git a/modules/setting/cache.go b/modules/setting/cache.go
index 1f79404e00..7be24b865f 100644
--- a/modules/setting/cache.go
+++ b/modules/setting/cache.go
@@ -10,8 +10,8 @@ import (
"code.gitea.io/gitea/modules/log"
- _ "github.com/go-macaron/cache/memcache" // memcache plugin for cache
- _ "github.com/go-macaron/cache/redis"
+ _ "gitea.com/macaron/cache/memcache" // memcache plugin for cache
+ _ "gitea.com/macaron/cache/redis"
)
// Cache represents cache settings
diff --git a/modules/setting/cors.go b/modules/setting/cors.go
index c1c3bfb813..04f3120536 100644
--- a/modules/setting/cors.go
+++ b/modules/setting/cors.go
@@ -9,7 +9,7 @@ import (
"code.gitea.io/gitea/modules/log"
- "github.com/go-macaron/cors"
+ "gitea.com/macaron/cors"
)
var (
@@ -28,7 +28,7 @@ func newCORSService() {
CORSConfig = cors.Options{
Scheme: sec.Key("SCHEME").String(),
- AllowDomain: sec.Key("ALLOW_DOMAIN").String(),
+ AllowDomain: sec.Key("ALLOW_DOMAIN").Strings(","),
AllowSubdomain: sec.Key("ALLOW_SUBDOMAIN").MustBool(),
Methods: sec.Key("METHODS").Strings(","),
MaxAgeSeconds: int(maxAge.Seconds()),
diff --git a/modules/setting/mailer.go b/modules/setting/mailer.go
index 3101ed5452..c692e0fe14 100644
--- a/modules/setting/mailer.go
+++ b/modules/setting/mailer.go
@@ -8,6 +8,7 @@ import (
"net/mail"
"code.gitea.io/gitea/modules/log"
+
shellquote "github.com/kballard/go-shellquote"
)
diff --git a/modules/setting/repository.go b/modules/setting/repository.go
index 98e3d6e826..728741576d 100644
--- a/modules/setting/repository.go
+++ b/modules/setting/repository.go
@@ -10,7 +10,8 @@ import (
"strings"
"code.gitea.io/gitea/modules/log"
- "github.com/Unknwon/com"
+
+ "github.com/unknwon/com"
)
// enumerates all the policy repository creating
diff --git a/modules/setting/session.go b/modules/setting/session.go
index bed3a9d8c0..6e5a28bb75 100644
--- a/modules/setting/session.go
+++ b/modules/setting/session.go
@@ -12,7 +12,7 @@ import (
"code.gitea.io/gitea/modules/log"
- "github.com/go-macaron/session"
+ "gitea.com/macaron/session"
)
var (
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 97db7eaf9e..123aa8f103 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -27,10 +27,10 @@ import (
_ "code.gitea.io/gitea/modules/minwinsvc" // import minwinsvc for windows services
"code.gitea.io/gitea/modules/user"
- "github.com/Unknwon/cae/zip"
- "github.com/Unknwon/com"
shellquote "github.com/kballard/go-shellquote"
version "github.com/mcuadros/go-version"
+ "github.com/unknwon/cae/zip"
+ "github.com/unknwon/com"
ini "gopkg.in/ini.v1"
"strk.kbt.io/projects/go/libravatar"
)
diff --git a/modules/ssh/ssh.go b/modules/ssh/ssh.go
index 1818f33306..7ff0c32326 100644
--- a/modules/ssh/ssh.go
+++ b/modules/ssh/ssh.go
@@ -22,8 +22,8 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/com"
"github.com/gliderlabs/ssh"
+ "github.com/unknwon/com"
gossh "golang.org/x/crypto/ssh"
)
diff --git a/modules/sync/unique_queue.go b/modules/sync/unique_queue.go
index ca7c21ac24..de694d8560 100644
--- a/modules/sync/unique_queue.go
+++ b/modules/sync/unique_queue.go
@@ -5,7 +5,7 @@
package sync
import (
- "github.com/Unknwon/com"
+ "github.com/unknwon/com"
)
// UniqueQueue is a queue which guarantees only one instance of same
diff --git a/modules/templates/dynamic.go b/modules/templates/dynamic.go
index d7c04ccb09..6217f1c3b0 100644
--- a/modules/templates/dynamic.go
+++ b/modules/templates/dynamic.go
@@ -14,8 +14,9 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/com"
- "gopkg.in/macaron.v1"
+
+ "gitea.com/macaron/macaron"
+ "github.com/unknwon/com"
)
var (
diff --git a/modules/templates/static.go b/modules/templates/static.go
index 3aabe17e4f..f7e53ce887 100644
--- a/modules/templates/static.go
+++ b/modules/templates/static.go
@@ -17,8 +17,9 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/com"
- "gopkg.in/macaron.v1"
+
+ "gitea.com/macaron/macaron"
+ "github.com/unknwon/com"
)
var (
diff --git a/modules/test/context_tests.go b/modules/test/context_tests.go
index d5a800d360..92df1c5762 100644
--- a/modules/test/context_tests.go
+++ b/modules/test/context_tests.go
@@ -14,9 +14,9 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
- "github.com/go-macaron/session"
+ "gitea.com/macaron/macaron"
+ "gitea.com/macaron/session"
"github.com/stretchr/testify/assert"
- "gopkg.in/macaron.v1"
)
// MockContext mock context for unit tests
diff --git a/modules/timeutil/since.go b/modules/timeutil/since.go
index 9ba111e54e..e6c29c19ff 100644
--- a/modules/timeutil/since.go
+++ b/modules/timeutil/since.go
@@ -12,7 +12,7 @@ import (
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/i18n"
+ "github.com/unknwon/i18n"
)
// Seconds-based time units
diff --git a/modules/timeutil/since_test.go b/modules/timeutil/since_test.go
index c016e4ac65..65d481a6aa 100644
--- a/modules/timeutil/since_test.go
+++ b/modules/timeutil/since_test.go
@@ -11,9 +11,9 @@ import (
"code.gitea.io/gitea/modules/setting"
- "github.com/Unknwon/i18n"
- macaroni18n "github.com/go-macaron/i18n"
+ macaroni18n "gitea.com/macaron/i18n"
"github.com/stretchr/testify/assert"
+ "github.com/unknwon/i18n"
)
var BaseDate time.Time
diff --git a/modules/validation/binding.go b/modules/validation/binding.go
index 03b6f6276d..fc420e62fb 100644
--- a/modules/validation/binding.go
+++ b/modules/validation/binding.go
@@ -9,7 +9,7 @@ import (
"regexp"
"strings"
- "github.com/go-macaron/binding"
+ "gitea.com/macaron/binding"
)
const (
diff --git a/modules/validation/binding_test.go b/modules/validation/binding_test.go
index de964a5488..5ac88c9317 100644
--- a/modules/validation/binding_test.go
+++ b/modules/validation/binding_test.go
@@ -9,9 +9,9 @@ import (
"net/http/httptest"
"testing"
- "github.com/go-macaron/binding"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/macaron"
"github.com/stretchr/testify/assert"
- "gopkg.in/macaron.v1"
)
const (
diff --git a/modules/validation/helpers_test.go b/modules/validation/helpers_test.go
index 9051ee1a0d..cc2a4b720d 100644
--- a/modules/validation/helpers_test.go
+++ b/modules/validation/helpers_test.go
@@ -7,9 +7,9 @@ package validation
import (
"testing"
- "github.com/stretchr/testify/assert"
-
"code.gitea.io/gitea/modules/setting"
+
+ "github.com/stretchr/testify/assert"
)
func Test_IsValidURL(t *testing.T) {
diff --git a/modules/validation/refname_test.go b/modules/validation/refname_test.go
index 57e3f1bf8e..521a83fa04 100644
--- a/modules/validation/refname_test.go
+++ b/modules/validation/refname_test.go
@@ -7,7 +7,7 @@ package validation
import (
"testing"
- "github.com/go-macaron/binding"
+ "gitea.com/macaron/binding"
)
var gitRefNameValidationTestCases = []validationTestCase{
diff --git a/modules/validation/validurl_test.go b/modules/validation/validurl_test.go
index ba4d7d53d9..aed7406c0a 100644
--- a/modules/validation/validurl_test.go
+++ b/modules/validation/validurl_test.go
@@ -7,7 +7,7 @@ package validation
import (
"testing"
- "github.com/go-macaron/binding"
+ "gitea.com/macaron/binding"
)
var urlValidationTestCases = []validationTestCase{