summaryrefslogtreecommitdiffstats
path: root/modules/test
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-01-20 18:46:10 +0100
committerGitHub <noreply@github.com>2022-01-20 18:46:10 +0100
commit54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch)
tree1be12fb072625c1b896b9d72f7912b018aad502b /modules/test
parent1d98d205f5825f40110e6628b61a97c91ac7f72d (diff)
downloadgitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz
gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
Diffstat (limited to 'modules/test')
-rw-r--r--modules/test/context_tests.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/test/context_tests.go b/modules/test/context_tests.go
index 1bc1d104bc..e6c78bcaa5 100644
--- a/modules/test/context_tests.go
+++ b/modules/test/context_tests.go
@@ -29,8 +29,8 @@ import (
// MockContext mock context for unit tests
func MockContext(t *testing.T, path string) *context.Context {
- var resp = &mockResponseWriter{}
- var ctx = context.Context{
+ resp := &mockResponseWriter{}
+ ctx := context.Context{
Render: &mockRender{},
Data: make(map[string]interface{}),
Flash: &middleware.Flash{
@@ -42,7 +42,7 @@ func MockContext(t *testing.T, path string) *context.Context {
requestURL, err := url.Parse(path)
assert.NoError(t, err)
- var req = &http.Request{
+ req := &http.Request{
URL: requestURL,
Form: url.Values{},
}
@@ -133,8 +133,7 @@ func (rw *mockResponseWriter) Push(target string, opts *http.PushOptions) error
return nil
}
-type mockRender struct {
-}
+type mockRender struct{}
func (tr *mockRender) TemplateLookup(tmpl string) *template.Template {
return nil