diff options
author | Mike Crute <mike@crute.us> | 2021-11-16 14:46:24 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2021-11-17 07:56:10 -0800 |
commit | cc58a3da7d647de8520e33dc4356672d2ed1a366 (patch) | |
tree | 1b232a0d51446eb6370cfb13932190d31ce053df /cloud/aws/error.go | |
parent | a42d794a286154a3106551e6e483861af2a9ef16 (diff) | |
download | cloud-identity-broker-cc58a3da7d647de8520e33dc4356672d2ed1a366.tar.bz2 cloud-identity-broker-cc58a3da7d647de8520e33dc4356672d2ed1a366.tar.xz cloud-identity-broker-cc58a3da7d647de8520e33dc4356672d2ed1a366.zip |
Import of source code
Diffstat (limited to 'cloud/aws/error.go')
-rw-r--r-- | cloud/aws/error.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cloud/aws/error.go b/cloud/aws/error.go new file mode 100644 index 0000000..62fda48 --- /dev/null +++ b/cloud/aws/error.go | |||
@@ -0,0 +1,11 @@ | |||
1 | package aws | ||
2 | |||
3 | import ( | ||
4 | "strings" | ||
5 | ) | ||
6 | |||
7 | // IsRegionNotExist tries to determine if the error is caused by a region not | ||
8 | // existing, as would be the case in a user typo. | ||
9 | func IsRegionNotExist(err error) bool { | ||
10 | return strings.Contains(err.Error(), "no such host") | ||
11 | } | ||