GetProjectIDWorksheetID returns the project ID and worksheet ID (resource_id) from a resource name. Format: projects/{project}/worksheets/{worksheet}
(name string)
| 447 | // GetProjectIDWorksheetID returns the project ID and worksheet ID (resource_id) from a resource name. |
| 448 | // Format: projects/{project}/worksheets/{worksheet} |
| 449 | func GetProjectIDWorksheetID(name string) (string, string, error) { |
| 450 | tokens, err := GetNameParentTokens(name, ProjectNamePrefix, WorksheetIDPrefix) |
| 451 | if err != nil { |
| 452 | return "", "", err |
| 453 | } |
| 454 | return tokens[0], tokens[1], nil |
| 455 | } |
| 456 | |
| 457 | // FormatWorksheet formats a worksheet resource name. |
| 458 | // Format: projects/{project}/worksheets/{worksheet} |
no test coverage detected