format with gofumpt (#18184)

* gofumpt -w -l .

* gofumpt -w -l -extra .

* Add linter

* manual fix

* change make fmt
This commit is contained in:
6543 2022-01-20 18:46:10 +01:00 committed by GitHub
parent 1d98d205f5
commit 54e9ee37a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
423 changed files with 1585 additions and 1758 deletions

View file

@ -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