forked from NYANDEV/forgejo
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
This commit is contained in:
parent
1d98d205f5
commit
54e9ee37a7
423 changed files with 1585 additions and 1758 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue