Skip to content

Commit d98b70f

Browse files
update CREDITS with new deps (#222)
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
1 parent 7ff009e commit d98b70f

9 files changed

+8338
-5559
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ linters:
2121
- structcheck
2222

2323
service:
24-
golangci-lint-version: 1.21.0 # use the fixed version to not introduce new linters unexpectedly
24+
golangci-lint-version: 1.27.0 # use the fixed version to not introduce new linters unexpectedly
2525

2626
run:
2727
skip-dirs:

CREDITS

Lines changed: 8307 additions & 5530 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ verifiers: getdeps fmt lint
2525

2626
fmt:
2727
@echo "Running $@ check"
28-
@GO111MODULE=on gofmt -d cmd/
28+
@GO111MODULE=on gofmt -d restapi/
2929
@GO111MODULE=on gofmt -d pkg/
30+
@GO111MODULE=on gofmt -d cmd/
31+
@GO111MODULE=on gofmt -d cluster/
3032

3133
lint:
3234
@echo "Running $@ check"

restapi/admin_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ func TestListConfig(t *testing.T) {
6060
function := "listConfig()"
6161
// Test-1 : listConfig() get list of two configurations and ensure is output correctly
6262
configListMock := []madmin.HelpKV{
63-
madmin.HelpKV{
63+
{
6464
Key: "region",
6565
Description: "label the location of the server",
6666
},
67-
madmin.HelpKV{
67+
{
6868
Key: "notify_nsq",
6969
Description: "publish bucket notifications to NSQ endpoints",
7070
},

restapi/admin_users_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ func TestListUsers(t *testing.T) {
6767
// Test-1 : listUsers() Get response from minio client with two users and return the same number on listUsers()
6868
// mock minIO client
6969
mockUserMap := map[string]madmin.UserInfo{
70-
"ABCDEFGHI": madmin.UserInfo{
70+
"ABCDEFGHI": {
7171
SecretKey: "",
7272
PolicyName: "ABCDEFGHI-policy",
7373
Status: "enabled",
7474
MemberOf: []string{"group1", "group2"},
7575
},
76-
"ZBCDEFGHI": madmin.UserInfo{
76+
"ZBCDEFGHI": {
7777
SecretKey: "",
7878
PolicyName: "ZBCDEFGHI-policy",
7979
Status: "enabled",

restapi/resource_quota_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ func Test_ResourceQuota(t *testing.T) {
6666
want: models.ResourceQuota{
6767
Name: mockRQResponse.Name,
6868
Elements: []*models.ResourceQuotaElement{
69-
&models.ResourceQuotaElement{
69+
{
7070
Name: "storage",
7171
Hard: int64(1000),
7272
Used: int64(500),
7373
},
74-
&models.ResourceQuotaElement{
74+
{
7575
Name: "cpu",
7676
Hard: int64(2048),
7777
Used: int64(1024),

restapi/user_buckets_events_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func TestListBucketEvents(t *testing.T) {
148148
LambdaConfigs: []notification.LambdaConfig{},
149149
TopicConfigs: []notification.TopicConfig{},
150150
QueueConfigs: []notification.QueueConfig{
151-
notification.QueueConfig{
151+
{
152152
Queue: "arn:minio:sqs::test:postgresql",
153153
Config: notification.Config{
154154
ID: "",
@@ -160,11 +160,11 @@ func TestListBucketEvents(t *testing.T) {
160160
Filter: &notification.Filter{
161161
S3Key: notification.S3Key{
162162
FilterRules: []notification.FilterRule{
163-
notification.FilterRule{
163+
{
164164
Name: "suffix",
165165
Value: ".jpg",
166166
},
167-
notification.FilterRule{
167+
{
168168
Name: "prefix",
169169
Value: "file/",
170170
},
@@ -176,7 +176,7 @@ func TestListBucketEvents(t *testing.T) {
176176
},
177177
}
178178
expectedOutput := []*models.NotificationConfig{
179-
&models.NotificationConfig{
179+
{
180180
Arn: swag.String("arn:minio:sqs::test:postgresql"),
181181
ID: "",
182182
Prefix: "file/",
@@ -213,7 +213,7 @@ func TestListBucketEvents(t *testing.T) {
213213
LambdaConfigs: []notification.LambdaConfig{},
214214
TopicConfigs: []notification.TopicConfig{},
215215
QueueConfigs: []notification.QueueConfig{
216-
notification.QueueConfig{
216+
{
217217
Queue: "arn:minio:sqs::test:postgresql",
218218
Config: notification.Config{
219219
ID: "",
@@ -225,7 +225,7 @@ func TestListBucketEvents(t *testing.T) {
225225
},
226226
}
227227
expectedOutput = []*models.NotificationConfig{
228-
&models.NotificationConfig{
228+
{
229229
Arn: swag.String("arn:minio:sqs::test:postgresql"),
230230
ID: "",
231231
Prefix: "",
@@ -258,7 +258,7 @@ func TestListBucketEvents(t *testing.T) {
258258
////// Test-3 : listBucketEvents() get list of events
259259
mockBucketN = notification.Configuration{
260260
LambdaConfigs: []notification.LambdaConfig{
261-
notification.LambdaConfig{
261+
{
262262
Lambda: "lambda",
263263
Config: notification.Config{
264264
ID: "",
@@ -268,11 +268,11 @@ func TestListBucketEvents(t *testing.T) {
268268
Filter: &notification.Filter{
269269
S3Key: notification.S3Key{
270270
FilterRules: []notification.FilterRule{
271-
notification.FilterRule{
271+
{
272272
Name: "suffix",
273273
Value: ".png",
274274
},
275-
notification.FilterRule{
275+
{
276276
Name: "prefix",
277277
Value: "lambda/",
278278
},
@@ -283,7 +283,7 @@ func TestListBucketEvents(t *testing.T) {
283283
},
284284
},
285285
TopicConfigs: []notification.TopicConfig{
286-
notification.TopicConfig{
286+
{
287287
Topic: "topic",
288288
Config: notification.Config{
289289
ID: "",
@@ -293,11 +293,11 @@ func TestListBucketEvents(t *testing.T) {
293293
Filter: &notification.Filter{
294294
S3Key: notification.S3Key{
295295
FilterRules: []notification.FilterRule{
296-
notification.FilterRule{
296+
{
297297
Name: "suffix",
298298
Value: ".gif",
299299
},
300-
notification.FilterRule{
300+
{
301301
Name: "prefix",
302302
Value: "topic/",
303303
},
@@ -308,7 +308,7 @@ func TestListBucketEvents(t *testing.T) {
308308
},
309309
},
310310
QueueConfigs: []notification.QueueConfig{
311-
notification.QueueConfig{
311+
{
312312
Queue: "arn:minio:sqs::test:postgresql",
313313
Config: notification.Config{
314314
ID: "",
@@ -326,7 +326,7 @@ func TestListBucketEvents(t *testing.T) {
326326
}
327327
// order matters in output: topic,queue then lambda are given respectively
328328
expectedOutput = []*models.NotificationConfig{
329-
&models.NotificationConfig{
329+
{
330330
Arn: swag.String("topic"),
331331
ID: "",
332332
Prefix: "topic/",
@@ -335,7 +335,7 @@ func TestListBucketEvents(t *testing.T) {
335335
models.NotificationEventTypeDelete,
336336
},
337337
},
338-
&models.NotificationConfig{
338+
{
339339
Arn: swag.String("arn:minio:sqs::test:postgresql"),
340340
ID: "",
341341
Prefix: "",
@@ -344,7 +344,7 @@ func TestListBucketEvents(t *testing.T) {
344344
models.NotificationEventTypeDelete,
345345
},
346346
},
347-
&models.NotificationConfig{
347+
{
348348
Arn: swag.String("lambda"),
349349
ID: "",
350350
Prefix: "lambda/",

restapi/user_buckets_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ func TestListBucket(t *testing.T) {
8282
mockBucketList := madmin.AccountUsageInfo{
8383
AccountName: "test",
8484
Buckets: []madmin.BucketUsageInfo{
85-
madmin.BucketUsageInfo{Name: "bucket-1", Created: time.Now(), Size: 1024},
86-
madmin.BucketUsageInfo{Name: "bucket-2", Created: time.Now().Add(time.Hour * 1), Size: 0},
85+
{Name: "bucket-1", Created: time.Now(), Size: 1024},
86+
{Name: "bucket-2", Created: time.Now().Add(time.Hour * 1), Size: 0},
8787
},
8888
}
8989
// mock function response from listBucketsWithContext(ctx)

restapi/user_watch_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestWatch(t *testing.T) {
7171
// mocking sending 5 lines of info
7272
for range lines {
7373
info := []mc.EventInfo{
74-
mc.EventInfo{
74+
{
7575
UserAgent: textToReceive,
7676
},
7777
}
@@ -134,7 +134,7 @@ func TestWatch(t *testing.T) {
134134
// mocking sending 5 lines of info
135135
for range lines {
136136
info := []mc.EventInfo{
137-
mc.EventInfo{
137+
{
138138
UserAgent: textToReceive,
139139
},
140140
}
@@ -177,7 +177,7 @@ func TestWatch(t *testing.T) {
177177
// mocking sending 5 lines of info
178178
for range lines {
179179
info := []mc.EventInfo{
180-
mc.EventInfo{
180+
{
181181
UserAgent: textToReceive,
182182
},
183183
}

0 commit comments

Comments
 (0)