diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8bb5f93..5be333a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -76,7 +76,7 @@ jobs: do cd $(dirname $PKG); echo "testing >>> $(basename $(dirname $PKG))"; - ginkgo -cover . + ginkgo run --cover . done env: GOOS: linux diff --git a/aws/aws_suite_test.go b/aws/aws_suite_test.go index 4a112c1..3d61637 100644 --- a/aws/aws_suite_test.go +++ b/aws/aws_suite_test.go @@ -48,7 +48,7 @@ import ( "github.com/nabbar/golib/aws/configCustom" "github.com/nabbar/golib/httpcli" "github.com/nabbar/golib/password" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/aws/bucket/bucket.go b/aws/bucket/bucket.go index ced7013..c3976c4 100644 --- a/aws/bucket/bucket.go +++ b/aws/bucket/bucket.go @@ -28,7 +28,6 @@ package bucket import ( "fmt" - sdkaws "github.com/aws/aws-sdk-go-v2/aws" sdksss "github.com/aws/aws-sdk-go-v2/service/s3" sdkstp "github.com/aws/aws-sdk-go-v2/service/s3/types" libhlp "github.com/nabbar/golib/aws/helper" @@ -91,64 +90,3 @@ func (cli *client) List() ([]sdkstp.Bucket, liberr.Error) { return out.Buckets, nil } - -func (cli *client) SetVersioning(state bool) liberr.Error { - var status sdkstp.BucketVersioningStatus = libhlp.STATE_ENABLED - if !state { - status = libhlp.STATE_SUSPENDED - } - - _, err := cli.s3.PutBucketVersioning(cli.GetContext(), &sdksss.PutBucketVersioningInput{ - Bucket: cli.GetBucketAws(), - VersioningConfiguration: &sdkstp.VersioningConfiguration{ - Status: status, - }, - }) - - return cli.GetError(err) -} - -func (cli *client) GetVersioning() (string, liberr.Error) { - out, err := cli.s3.GetBucketVersioning(cli.GetContext(), &sdksss.GetBucketVersioningInput{ - Bucket: cli.GetBucketAws(), - }) - - if err != nil { - return "", cli.GetError(err) - } else if out == nil { - return "", libhlp.ErrorResponse.Error(nil) - } - - // MarshalValue always return error as nil - return string(out.Status), nil -} - -func (cli *client) EnableReplication(srcRoleARN, dstRoleARN, dstBucketName string) liberr.Error { - var status sdkstp.ReplicationRuleStatus = libhlp.STATE_ENABLED - - _, err := cli.s3.PutBucketReplication(cli.GetContext(), &sdksss.PutBucketReplicationInput{ - Bucket: cli.GetBucketAws(), - ReplicationConfiguration: &sdkstp.ReplicationConfiguration{ - Role: sdkaws.String(srcRoleARN + "," + dstRoleARN), - Rules: []sdkstp.ReplicationRule{ - { - Destination: &sdkstp.Destination{ - Bucket: sdkaws.String("arn:aws:s3:::" + dstBucketName), - }, - Status: status, - Prefix: sdkaws.String(""), - }, - }, - }, - }) - - return cli.GetError(err) -} - -func (cli *client) DeleteReplication() liberr.Error { - _, err := cli.s3.DeleteBucketReplication(cli.GetContext(), &sdksss.DeleteBucketReplicationInput{ - Bucket: cli.GetBucketAws(), - }) - - return cli.GetError(err) -} diff --git a/aws/bucket/cors.go b/aws/bucket/cors.go new file mode 100644 index 0000000..c23d1ab --- /dev/null +++ b/aws/bucket/cors.go @@ -0,0 +1,61 @@ +/* + * MIT License + * + * Copyright (c) 2022 Nicolas JUHEL + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +package bucket + +import ( + sdksss "github.com/aws/aws-sdk-go-v2/service/s3" + sdkstp "github.com/aws/aws-sdk-go-v2/service/s3/types" + libhlp "github.com/nabbar/golib/aws/helper" + liberr "github.com/nabbar/golib/errors" +) + +func (cli *client) GetCORS() ([]sdkstp.CORSRule, liberr.Error) { + out, err := cli.s3.GetBucketCors(cli.GetContext(), &sdksss.GetBucketCorsInput{ + Bucket: cli.GetBucketAws(), + }) + + if err != nil { + return nil, cli.GetError(err) + } else if out == nil { + return nil, libhlp.ErrorResponse.Error(nil) + } else if out.CORSRules == nil || len(out.CORSRules) < 1 { + return make([]sdkstp.CORSRule, 0), nil + } + + // MarshalValue always return error as nil + return out.CORSRules, nil +} + +func (cli *client) SetCORS(cors []sdkstp.CORSRule) liberr.Error { + _, err := cli.s3.PutBucketCors(cli.GetContext(), &sdksss.PutBucketCorsInput{ + Bucket: cli.GetBucketAws(), + CORSConfiguration: &sdkstp.CORSConfiguration{ + CORSRules: cors, + }, + }) + + return cli.GetError(err) +} diff --git a/aws/bucket/interface.go b/aws/bucket/interface.go index 5e5fd8c..d7bcb35 100644 --- a/aws/bucket/interface.go +++ b/aws/bucket/interface.go @@ -32,6 +32,7 @@ import ( sdksss "github.com/aws/aws-sdk-go-v2/service/s3" sdkstp "github.com/aws/aws-sdk-go-v2/service/s3/types" libhlp "github.com/nabbar/golib/aws/helper" + liberr "github.com/nabbar/golib/errors" ligerr "github.com/nabbar/golib/errors" ) @@ -55,6 +56,12 @@ type Bucket interface { EnableReplication(srcRoleARN, dstRoleARN, dstBucketName string) ligerr.Error DeleteReplication() ligerr.Error + + PutWebsite(index, error string) liberr.Error + GetWebsite() (*sdksss.GetBucketWebsiteOutput, liberr.Error) + + SetCORS(cors []sdkstp.CORSRule) liberr.Error + GetCORS() ([]sdkstp.CORSRule, liberr.Error) } func New(ctx context.Context, bucket, region string, iam *sdkiam.Client, s3 *sdksss.Client) Bucket { diff --git a/aws/bucket/replication.go b/aws/bucket/replication.go new file mode 100644 index 0000000..52ee488 --- /dev/null +++ b/aws/bucket/replication.go @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2020 Nicolas JUHEL + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +package bucket + +import ( + sdkaws "github.com/aws/aws-sdk-go-v2/aws" + sdksss "github.com/aws/aws-sdk-go-v2/service/s3" + sdkstp "github.com/aws/aws-sdk-go-v2/service/s3/types" + libhlp "github.com/nabbar/golib/aws/helper" + liberr "github.com/nabbar/golib/errors" +) + +func (cli *client) EnableReplication(srcRoleARN, dstRoleARN, dstBucketName string) liberr.Error { + var status sdkstp.ReplicationRuleStatus = libhlp.STATE_ENABLED + + _, err := cli.s3.PutBucketReplication(cli.GetContext(), &sdksss.PutBucketReplicationInput{ + Bucket: cli.GetBucketAws(), + ReplicationConfiguration: &sdkstp.ReplicationConfiguration{ + Role: sdkaws.String(srcRoleARN + "," + dstRoleARN), + Rules: []sdkstp.ReplicationRule{ + { + Destination: &sdkstp.Destination{ + Bucket: sdkaws.String("arn:aws:s3:::" + dstBucketName), + }, + Status: status, + Prefix: sdkaws.String(""), + }, + }, + }, + }) + + return cli.GetError(err) +} + +func (cli *client) DeleteReplication() liberr.Error { + _, err := cli.s3.DeleteBucketReplication(cli.GetContext(), &sdksss.DeleteBucketReplicationInput{ + Bucket: cli.GetBucketAws(), + }) + + return cli.GetError(err) +} diff --git a/aws/bucket/version.go b/aws/bucket/version.go new file mode 100644 index 0000000..647b95d --- /dev/null +++ b/aws/bucket/version.go @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2020 Nicolas JUHEL + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +package bucket + +import ( + sdksss "github.com/aws/aws-sdk-go-v2/service/s3" + sdkstp "github.com/aws/aws-sdk-go-v2/service/s3/types" + libhlp "github.com/nabbar/golib/aws/helper" + liberr "github.com/nabbar/golib/errors" +) + +func (cli *client) SetVersioning(state bool) liberr.Error { + var status sdkstp.BucketVersioningStatus = libhlp.STATE_ENABLED + if !state { + status = libhlp.STATE_SUSPENDED + } + + _, err := cli.s3.PutBucketVersioning(cli.GetContext(), &sdksss.PutBucketVersioningInput{ + Bucket: cli.GetBucketAws(), + VersioningConfiguration: &sdkstp.VersioningConfiguration{ + Status: status, + }, + }) + + return cli.GetError(err) +} + +func (cli *client) GetVersioning() (string, liberr.Error) { + out, err := cli.s3.GetBucketVersioning(cli.GetContext(), &sdksss.GetBucketVersioningInput{ + Bucket: cli.GetBucketAws(), + }) + + if err != nil { + return "", cli.GetError(err) + } else if out == nil { + return "", libhlp.ErrorResponse.Error(nil) + } + + // MarshalValue always return error as nil + return string(out.Status), nil +} diff --git a/aws/bucket/website.go b/aws/bucket/website.go new file mode 100644 index 0000000..1090ad1 --- /dev/null +++ b/aws/bucket/website.go @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2022 Nicolas JUHEL + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +package bucket + +import ( + sdkaws "github.com/aws/aws-sdk-go-v2/aws" + sdksss "github.com/aws/aws-sdk-go-v2/service/s3" + sdkstp "github.com/aws/aws-sdk-go-v2/service/s3/types" + libhlp "github.com/nabbar/golib/aws/helper" + liberr "github.com/nabbar/golib/errors" +) + +func (cli *client) PutWebsite(index, error string) liberr.Error { + _, err := cli.s3.PutBucketWebsite(cli.GetContext(), &sdksss.PutBucketWebsiteInput{ + Bucket: cli.GetBucketAws(), + WebsiteConfiguration: &sdkstp.WebsiteConfiguration{ + ErrorDocument: &sdkstp.ErrorDocument{ + Key: sdkaws.String(error), + }, + IndexDocument: &sdkstp.IndexDocument{ + Suffix: sdkaws.String(index), + }, + }, + }) + + return cli.GetError(err) +} + +func (cli *client) GetWebsite() (*sdksss.GetBucketWebsiteOutput, liberr.Error) { + out, err := cli.s3.GetBucketWebsite(cli.GetContext(), &sdksss.GetBucketWebsiteInput{ + Bucket: cli.GetBucketAws(), + }) + + if err != nil { + return nil, cli.GetError(err) + } else if out == nil { + return nil, libhlp.ErrorResponse.Error(nil) + } + + // MarshalValue always return error as nil + return out, nil +} diff --git a/aws/bucket_test.go b/aws/bucket_test.go index 528d633..3e2084d 100644 --- a/aws/bucket_test.go +++ b/aws/bucket_test.go @@ -26,7 +26,7 @@ package aws_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/aws/group_test.go b/aws/group_test.go index 7096b61..02111e6 100644 --- a/aws/group_test.go +++ b/aws/group_test.go @@ -28,7 +28,7 @@ package aws_test import ( "fmt" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/aws/object_test.go b/aws/object_test.go index d8401f9..8ec1955 100644 --- a/aws/object_test.go +++ b/aws/object_test.go @@ -28,7 +28,7 @@ package aws_test import ( "bytes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/aws/policy_test.go b/aws/policy_test.go index a43eb3b..2bce350 100644 --- a/aws/policy_test.go +++ b/aws/policy_test.go @@ -26,7 +26,7 @@ package aws_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/aws/role_test.go b/aws/role_test.go index abb24af..4c1e01e 100644 --- a/aws/role_test.go +++ b/aws/role_test.go @@ -28,7 +28,7 @@ package aws_test import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/iam/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/aws/user_test.go b/aws/user_test.go index c001850..1fe2860 100644 --- a/aws/user_test.go +++ b/aws/user_test.go @@ -29,7 +29,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/nabbar/golib/password" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/go.mod b/go.mod index 9cf6458..5a70bce 100644 --- a/go.mod +++ b/go.mod @@ -3,43 +3,43 @@ module github.com/nabbar/golib go 1.17 require ( - github.com/aws/aws-sdk-go-v2 v1.11.2 - github.com/aws/aws-sdk-go-v2/config v1.11.1 - github.com/aws/aws-sdk-go-v2/credentials v1.6.5 - github.com/aws/aws-sdk-go-v2/service/iam v1.14.0 - github.com/aws/aws-sdk-go-v2/service/s3 v1.22.0 + github.com/aws/aws-sdk-go-v2 v1.12.0 + github.com/aws/aws-sdk-go-v2/config v1.12.0 + github.com/aws/aws-sdk-go-v2/credentials v1.7.0 + github.com/aws/aws-sdk-go-v2/service/iam v1.15.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.23.0 github.com/c-bata/go-prompt v0.2.6 github.com/fatih/color v1.13.0 - github.com/fxamacker/cbor/v2 v2.3.1 + github.com/fxamacker/cbor/v2 v2.4.0 github.com/gin-gonic/gin v1.7.7 github.com/go-ldap/ldap/v3 v3.4.1 - github.com/go-playground/validator/v10 v10.9.0 + github.com/go-playground/validator/v10 v10.10.0 github.com/gobuffalo/packr v1.30.1 github.com/google/go-github/v33 v33.0.0 - github.com/hashicorp/go-hclog v1.0.0 + github.com/hashicorp/go-hclog v1.1.0 github.com/hashicorp/go-retryablehttp v0.7.0 github.com/hashicorp/go-uuid v1.0.2 - github.com/hashicorp/go-version v1.3.0 + github.com/hashicorp/go-version v1.4.0 github.com/lni/dragonboat/v3 v3.3.4 github.com/matcornic/hermes/v2 v2.1.0 github.com/mattn/go-colorable v0.1.12 github.com/nats-io/jwt/v2 v2.2.0 github.com/nats-io/nats-server/v2 v2.6.6 github.com/nats-io/nats.go v1.13.1-0.20211122170419-d7c1d78a50fc - github.com/onsi/ginkgo v1.16.5 + github.com/onsi/ginkgo/v2 v2.0.0 github.com/onsi/gomega v1.17.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/sirupsen/logrus v1.8.1 github.com/spf13/jwalterweatherman v1.1.0 github.com/vbauerster/mpb/v5 v5.4.0 - github.com/xanzy/go-gitlab v0.52.2 + github.com/xanzy/go-gitlab v0.54.3 github.com/xhit/go-simple-mail v2.2.2+incompatible github.com/xujiajun/nutsdb v0.6.0 github.com/xujiajun/utils v0.0.0-20190123093513-8bf096c4f53b - golang.org/x/net v0.0.0-20211216030914-fe4d6282115f + golang.org/x/net v0.0.0-20220111093109-d55c255bac03 golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e + golang.org/x/sys v0.0.0-20220111092808-5a964db01320 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 ) @@ -55,24 +55,23 @@ require ( github.com/andybalholm/cascadia v1.3.1 // indirect github.com/aokoli/goutils v1.1.1 // indirect github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.8.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.5.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.7.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.12.0 // indirect - github.com/aws/smithy-go v1.9.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.1.0 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.9.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.1.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.6.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.6.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.10.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.13.0 // indirect + github.com/aws/smithy-go v1.9.1 // indirect github.com/bwmarrin/snowflake v0.3.0 // indirect github.com/cockroachdb/errors v1.7.5 // indirect github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect github.com/cockroachdb/pebble v0.0.0-20210331181633-27fc006b8bfb // indirect github.com/cockroachdb/redact v1.0.6 // indirect github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-asn1-ber/asn1-ber v1.5.3 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -101,7 +100,7 @@ require ( github.com/joho/godotenv v1.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/juju/ratelimit v1.0.2-0.20191002062651-f60b32039441 // indirect - github.com/klauspost/compress v1.13.6 // indirect + github.com/klauspost/compress v1.14.1 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.2.1 // indirect @@ -117,7 +116,6 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/nats-io/nkeys v0.3.0 // indirect github.com/nats-io/nuid v1.0.1 // indirect - github.com/nxadm/tail v1.4.8 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pkg/term v1.2.0-beta.2 // indirect @@ -135,12 +133,11 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/xujiajun/mmap-go v1.0.1 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect + golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect golang.org/x/exp v0.0.0-20200513190911-00229845015e // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.27.1 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/logger/interface_test.go b/logger/interface_test.go index 98377f8..9ea598a 100644 --- a/logger/interface_test.go +++ b/logger/interface_test.go @@ -27,7 +27,7 @@ package logger_test import ( "github.com/nabbar/golib/logger" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/logger/logger_suite_test.go b/logger/logger_suite_test.go index 839443a..c5b3478 100644 --- a/logger/logger_suite_test.go +++ b/logger/logger_suite_test.go @@ -32,7 +32,7 @@ import ( "github.com/nabbar/golib/ioutils" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" )