update CREDITS and enable builds for go1.19 (#2227)

This commit is contained in:
Harshavardhana
2022-08-05 08:07:38 -07:00
committed by GitHub
parent 84b8f9d6fa
commit ddd25a20eb
13 changed files with 1220 additions and 1672 deletions

View File

@@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -98,7 +98,7 @@ jobs:
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -168,7 +168,7 @@ jobs:
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
steps:
@@ -210,7 +210,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -234,7 +234,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -281,7 +281,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -341,7 +341,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -379,7 +379,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -458,7 +458,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -537,7 +537,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -618,7 +618,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -687,7 +687,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -756,7 +756,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -825,7 +825,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -894,7 +894,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -963,7 +963,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1042,7 +1042,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1116,7 +1116,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1154,7 +1154,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1192,7 +1192,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1230,7 +1230,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1268,7 +1268,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1306,7 +1306,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1344,7 +1344,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1382,7 +1382,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1428,7 +1428,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1475,7 +1475,7 @@ jobs:
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
@@ -1587,7 +1587,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
go-version: [ 1.18.x, 1.19.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}

View File

@@ -4,6 +4,12 @@ linters-settings:
misspell:
locale: US
goheader:
values:
regexp:
copyright-holder: Copyright \(c\) (20\d\d\-20\d\d)|2021|({{year}})
template-path: .license.tmpl
linters:
disable-all: true
@@ -28,13 +34,6 @@ linters:
- tenv
- durationcheck
linters-settings:
goheader:
values:
regexp:
copyright-holder: Copyright \(c\) (20\d\d\-20\d\d)|2021|({{year}})
template-path: .license.tmpl
service:
golangci-lint-version: 1.43.0 # use the fixed version to not introduce new linters unexpectedly
@@ -52,3 +51,4 @@ run:
skip-dirs:
- pkg/clientgen
- pkg/apis/networking.gke.io
- restapi/operations

2768
CREDITS

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,7 @@ k8sdev:
getdeps:
@mkdir -p ${GOPATH}/bin
@echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.45.2
@echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin
verifiers: getdeps fmt lint

View File

@@ -180,8 +180,9 @@ const (
// or data key provided as plaintext.
//
// The returned ciphertext data consists of:
// AEAD ID | iv | nonce | encrypted data
// 1 16 12 ~ len(data)
//
// AEAD ID | iv | nonce | encrypted data
// 1 16 12 ~ len(data)
func encrypt(plaintext, associatedData []byte) ([]byte, error) {
iv, err := sioutil.Random(16) // 16 bytes IV
if err != nil {

View File

@@ -26,7 +26,7 @@ import (
// Target is the entity that we will receive
// a single log entry and Send it to the log target
// e.g. Send the log to a http server
// e.g. Send the log to a http server
type Target interface {
String() string
Endpoint() string

View File

@@ -280,8 +280,8 @@ func setGroupStatus(ctx context.Context, client MinioAdmin, group, status string
}
// getUpdateGroupResponse updates a group by adding or removing it's members depending on the request,
// also sets the group's status if status in the request is different than the current one.
// Then serializes the output to be used by the handler.
// also sets the group's status if status in the request is different than the current one.
// Then serializes the output to be used by the handler.
func getUpdateGroupResponse(session *models.Principal, params groupApi.UpdateGroupParams) (*models.Group, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
@@ -320,8 +320,8 @@ func getUpdateGroupResponse(session *models.Principal, params groupApi.UpdateGro
}
// groupUpdate updates a group given the expected parameters, compares the expected parameters against the current ones
// and updates them accordingly, status is only updated if the expected status is different than the current one.
// Then fetches the group again to return the object updated.
// and updates them accordingly, status is only updated if the expected status is different than the current one.
// Then fetches the group again to return the object updated.
func groupUpdate(ctx context.Context, client MinioAdmin, groupName string, expectedGroup *models.UpdateGroupRequest) (*madmin.GroupDesc, error) {
expectedMembers := expectedGroup.Members
expectedStatus := *expectedGroup.Status

View File

@@ -127,7 +127,7 @@ func startTraceInfo(ctx context.Context, conn WSConn, client MinioAdmin, opts Tr
}
// shortTrace creates a shorter Trace Info message.
// Same implementation as github/minio/mc/cmd/admin-trace.go
// Same implementation as github/minio/mc/cmd/admin-trace.go
func shortTrace(info *madmin.ServiceTraceInfo) shortTraceMsg {
t := info.Trace
s := shortTraceMsg{}

View File

@@ -116,7 +116,7 @@ func Test_getSubPath(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
os.Setenv(SubPath, tt.args.envValue)
t.Setenv(SubPath, tt.args.envValue)
defer os.Unsetenv(SubPath)
subPathOnce = sync.Once{}
assert.Equalf(t, tt.want, getSubPath(), "getSubPath()")

View File

@@ -547,7 +547,7 @@ func setBucketAccessPolicy(ctx context.Context, client MinioClient, bucketName s
}
// getBucketSetPolicyResponse calls setBucketAccessPolicy() to set a access policy to a bucket
// and returns the serialized output.
// and returns the serialized output.
func getBucketSetPolicyResponse(session *models.Principal, params bucketApi.BucketSetPolicyParams) (*models.Bucket, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()

View File

@@ -37,7 +37,7 @@ func (mc minioClientMock) getBucketNotification(ctx context.Context, bucketName
return minioGetBucketNotificationMock(ctx, bucketName)
}
//// Mock mc S3Client functions ////
// // Mock mc S3Client functions ////
var (
mcAddNotificationConfigMock func(ctx context.Context, arn string, events []string, prefix, suffix string, ignoreExisting bool) *probe.Error
mcRemoveNotificationConfigMock func(ctx context.Context, arn string, event string, prefix string, suffix string) *probe.Error

View File

@@ -288,8 +288,9 @@ type httpRange struct {
}
// Example:
// "Content-Range": "bytes 100-200/1000"
// "Content-Range": "bytes 100-200/*"
//
// "Content-Range": "bytes 100-200/1000"
// "Content-Range": "bytes 100-200/*"
func getRange(start, end, total int64) string {
// unknown total: -1
if total == -1 {
@@ -300,10 +301,11 @@ func getRange(start, end, total int64) string {
}
// Example:
// "Range": "bytes=100-200"
// "Range": "bytes=-50"
// "Range": "bytes=150-"
// "Range": "bytes=0-0,-1"
//
// "Range": "bytes=100-200"
// "Range": "bytes=-50"
// "Range": "bytes=150-"
// "Range": "bytes=0-0,-1"
func parseRange(s string, size int64) ([]httpRange, error) {
if s == "" {
return nil, nil // header not present
@@ -669,8 +671,9 @@ func deleteObjects(ctx context.Context, client MCClient, bucket string, path str
}
// deleteMultipleObjects uses listing before removal, it can list recursively or not,
// Use cases:
// * Remove objects recursively
//
// Use cases:
// * Remove objects recursively
func deleteMultipleObjects(ctx context.Context, client MCClient, recursive bool, allVersions bool) error {
isBypass := false
isIncomplete := false

View File

@@ -161,8 +161,8 @@ func createServiceAccountCreds(ctx context.Context, userClient MinioAdmin, polic
}
// getCreateServiceAccountResponse creates a service account with the defined policy for the user that
// is requestingit ,it first gets the credentials of the user and creates a client which is going to
// make the call to create the Service Account
// is requesting, it first gets the credentials of the user and creates a client which is going to
// make the call to create the Service Account
func getCreateServiceAccountResponse(session *models.Principal, params saApi.CreateServiceAccountParams) (*models.ServiceAccountCreds, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
@@ -222,8 +222,8 @@ func createAUserServiceAccountCreds(ctx context.Context, userClient MinioAdmin,
}
// getCreateServiceAccountResponse creates a service account with the defined policy for the user that
// is requesting it ,it first gets the credentials of the user and creates a client which is going to
// make the call to create the Service Account
// is requesting it ,it first gets the credentials of the user and creates a client which is going to
// make the call to create the Service Account
func getCreateAUserServiceAccountResponse(session *models.Principal, params userApi.CreateAUserServiceAccountParams) (*models.ServiceAccountCreds, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
@@ -247,7 +247,7 @@ func getCreateAUserServiceAccountResponse(session *models.Principal, params user
}
// getCreateServiceAccountCredsResponse creates a service account with the defined policy for the user that
// is requesting it, and with the credentials provided
// is requesting it, and with the credentials provided
func getCreateAUserServiceAccountCredsResponse(session *models.Principal, params userApi.CreateServiceAccountCredentialsParams) (*models.ServiceAccountCreds, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()