Skip to content

Commit

Permalink
Remove unused aws-sdk-go v1 error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
rifelpet committed Apr 20, 2024
1 parent a1514b9 commit d809f2a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions upup/pkg/fi/cloudup/awsup/aws_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
elbtypes "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing/types"
elbv2types "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types"
iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/smithy-go"
"k8s.io/klog/v2"
"k8s.io/kops/pkg/apis/kops"
Expand Down Expand Up @@ -156,9 +155,6 @@ func FindELBV2Tag(tags []elbv2types.Tag, key string) (string, bool) {

// AWSErrorCode returns the aws error code, if it is an awserr.Error or smithy.APIError, otherwise ""
func AWSErrorCode(err error) string {
if awsError, ok := err.(awserr.Error); ok {
return awsError.Code()
}
var apiErr smithy.APIError
if errors.As(err, &apiErr) {
return apiErr.ErrorCode()
Expand All @@ -168,9 +164,6 @@ func AWSErrorCode(err error) string {

// AWSErrorMessage returns the aws error message, if it is an awserr.Error or smithy.APIError, otherwise ""
func AWSErrorMessage(err error) string {
if awsError, ok := err.(awserr.Error); ok {
return awsError.Message()
}
var apiErr smithy.APIError
if errors.As(err, &apiErr) {
return apiErr.ErrorMessage()
Expand Down

0 comments on commit d809f2a

Please sign in to comment.