GetUserEmail returns the user email from a resource name.
(name string)
| 177 | |
| 178 | // GetUserEmail returns the user email from a resource name. |
| 179 | func GetUserEmail(name string) (string, error) { |
| 180 | tokens, err := GetNameParentTokens(name, UserNamePrefix) |
| 181 | if err != nil { |
| 182 | return "", err |
| 183 | } |
| 184 | return tokens[0], nil |
| 185 | } |
| 186 | |
| 187 | // GetSettingName returns the setting name from a resource name. |
| 188 | func GetSettingName(name string) (string, error) { |
no test coverage detected