Use gitea forked macaron (#7933)
Signed-off-by: Tamal Saha <tamal@appscode.com>
This commit is contained in:
parent
ca6fb004ac
commit
171b359877
408 changed files with 14882 additions and 13217 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
// ________ .__ __ .__
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
// _______________________________________ _________.______________________ _______________.___.
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
2
modules/cache/cache.go
vendored
2
modules/cache/cache.go
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -15,8 +15,8 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"gitea.com/macaron/macaron"
|
||||
"github.com/klauspost/compress/gzip"
|
||||
"gopkg.in/macaron.v1"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
|
||||
"github.com/lunny/levelqueue"
|
||||
)
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import (
|
|||
"time"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
|
||||
"github.com/go-redis/redis"
|
||||
)
|
||||
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,7 +12,8 @@ import (
|
|||
"path"
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"github.com/Unknwon/com"
|
||||
|
||||
"github.com/unknwon/com"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -12,7 +12,8 @@ import (
|
|||
"path"
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"github.com/Unknwon/com"
|
||||
|
||||
"github.com/unknwon/com"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package public
|
||||
|
||||
import (
|
||||
"gopkg.in/macaron.v1"
|
||||
"gitea.com/macaron/macaron"
|
||||
)
|
||||
|
||||
// Static implements the macaron static handler for serving assets.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package public
|
||||
|
||||
import (
|
||||
"gopkg.in/macaron.v1"
|
||||
"gitea.com/macaron/macaron"
|
||||
)
|
||||
|
||||
// Static implements the macaron static handler for serving assets.
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()),
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/mail"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
|
||||
shellquote "github.com/kballard/go-shellquote"
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
|
||||
"github.com/go-macaron/session"
|
||||
"gitea.com/macaron/session"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
|
||||
"github.com/Unknwon/i18n"
|
||||
"github.com/unknwon/i18n"
|
||||
)
|
||||
|
||||
// Seconds-based time units
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/go-macaron/binding"
|
||||
"gitea.com/macaron/binding"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -7,7 +7,7 @@ package validation
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/go-macaron/binding"
|
||||
"gitea.com/macaron/binding"
|
||||
)
|
||||
|
||||
var gitRefNameValidationTestCases = []validationTestCase{
|
||||
|
|
|
@ -7,7 +7,7 @@ package validation
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/go-macaron/binding"
|
||||
"gitea.com/macaron/binding"
|
||||
)
|
||||
|
||||
var urlValidationTestCases = []validationTestCase{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue