Skip to content

Commit

Permalink
Add gofumpt to golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Mar 25, 2022
1 parent f192ce2 commit f9a9c17
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ run:
linters:
disable-all: true
enable:
- gofmt
- gofumpt
- goimports
1 change: 0 additions & 1 deletion fakestorage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
)

func (s *Server) updateServerConfig(r *http.Request) jsonResponse {

var configOptions struct {
ExternalUrl string `json:"externalUrl,omitempty"`
PublicHost string `json:"publicHost,omitempty"`
Expand Down
1 change: 0 additions & 1 deletion fakestorage/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ func (s *Server) handleBatchCall(w http.ResponseWriter, r *http.Request) {
partHeaders.Set("Content-Type", "application/http")
partHeaders.Set("Content-ID", strings.Replace(contentID, "<", "<response-", 1))
partWriter, err := mw.CreatePart(partHeaders)

if err != nil {
continue
}
Expand Down
4 changes: 2 additions & 2 deletions fakestorage/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestNewServerLogging(t *testing.T) {

func TestPublicURL(t *testing.T) {
t.Parallel()
var tests = []struct {
tests := []struct {
name string
options Options
expected string
Expand Down Expand Up @@ -858,7 +858,7 @@ func (m *fakeEventManager) Trigger(o *backend.Object, eventType notification.Eve
}

func runServersTest(t *testing.T, objs []Object, fn func(*testing.T, *Server)) {
var testScenarios = []struct {
testScenarios := []struct {
name string
options Options
}{
Expand Down
6 changes: 4 additions & 2 deletions internal/backend/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ type Error string

func (e Error) Error() string { return string(e) }

const BucketNotFound = Error("bucket not found")
const BucketNotEmpty = Error("bucket must be empty prior to deletion")
const (
BucketNotFound = Error("bucket not found")
BucketNotEmpty = Error("bucket must be empty prior to deletion")
)

0 comments on commit f9a9c17

Please sign in to comment.