(resourceID string)
| 10 | var resourceIDRegex = regexp.MustCompile(`^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`) |
| 11 | |
| 12 | func validateResourceID(resourceID string) error { |
| 13 | if !resourceIDRegex.MatchString(resourceID) { |
| 14 | return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid resource ID %q", resourceID)) |
| 15 | } |
| 16 | return nil |
| 17 | } |