diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-01 21:40:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-01 21:40:17 +0800 |
commit | 7ff783b7320bdeda89ed6a021c304e64f9d9170e (patch) | |
tree | aba54e41a83ec4064f0d5d09024e94c4ce4030d1 /modules/templates/helper.go | |
parent | 177aedfca9bf4a15dd154a1f1ac136e9ba3e0f24 (diff) | |
download | gitea-7ff783b7320bdeda89ed6a021c304e64f9d9170e.tar.gz gitea-7ff783b7320bdeda89ed6a021c304e64f9d9170e.zip |
Move mirror to a standalone package from models (#7486)
* move mirror to a standalone package
* fix mirror address in template
* fix tests
* fix lint
* fix comment
* fix tests
* fix tests
* fix vendor
* fix fmt
* fix lint
* remove wrong file submitted
* fix conflict
* remove unrelated changes
* fix go mod
* fix tests
* clean go mod
* make vendor work
* make vendor work
* fix tests
* remove duplicated test
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r-- | modules/templates/helper.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index ba61dd5eef..b40f7117f5 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -28,6 +28,7 @@ import ( "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/services/gitdiff" + mirror_service "code.gitea.io/gitea/services/mirror" "gopkg.in/editorconfig/editorconfig-core-go.v1" ) @@ -233,6 +234,8 @@ func NewFuncMap() []template.FuncMap { return float32(n) * 100 / float32(sum) }, "CommentMustAsDiff": gitdiff.CommentMustAsDiff, + "MirrorAddress": mirror_service.Address, + "MirrorFullAddress": mirror_service.AddressNoCredentials, }} } |