mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-08 15:13:56 -06:00
15 lines
269 B
Go
15 lines
269 B
Go
package aws
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/aws/aws-sdk-go/aws/awserr"
|
|
)
|
|
|
|
func isAWSErr(err error, code string, message string) bool {
|
|
if err, ok := err.(awserr.Error); ok {
|
|
return err.Code() == code && strings.Contains(err.Message(), message)
|
|
}
|
|
return false
|
|
}
|