TrimSuffixAndGetInstanceDatabaseID trims the suffix from the name and returns the instance ID and database ID.
(name string, suffix string)
| 120 | |
| 121 | // TrimSuffixAndGetInstanceDatabaseID trims the suffix from the name and returns the instance ID and database ID. |
| 122 | func TrimSuffixAndGetInstanceDatabaseID(name string, suffix string) (string, string, error) { |
| 123 | trimmed, err := TrimSuffix(name, suffix) |
| 124 | if err != nil { |
| 125 | return "", "", err |
| 126 | } |
| 127 | return GetInstanceDatabaseID(trimmed) |
| 128 | } |
| 129 | |
| 130 | // GetEnvironmentID returns the environment ID from a resource name. |
| 131 | func GetEnvironmentID(name string) (string, error) { |
no test coverage detected