GetProjectIDIssueUIDIssueCommentID returns the project ID, issue UID and issue comment ID from the issue comment name.
(name string)
| 217 | |
| 218 | // GetProjectIDIssueUIDIssueCommentID returns the project ID, issue UID and issue comment ID from the issue comment name. |
| 219 | func GetProjectIDIssueUIDIssueCommentID(name string) (string, int64, string, error) { |
| 220 | tokens, err := GetNameParentTokens(name, ProjectNamePrefix, IssueNamePrefix, IssueCommentNamePrefix) |
| 221 | if err != nil { |
| 222 | return "", 0, "", err |
| 223 | } |
| 224 | issueUID, err := strconv.ParseInt(tokens[1], 10, 64) |
| 225 | if err != nil { |
| 226 | return "", 0, "", errors.Errorf("invalid issue ID %q", tokens[1]) |
| 227 | } |
| 228 | return tokens[0], issueUID, tokens[2], nil |
| 229 | } |
| 230 | |
| 231 | // GetProjectIDPlanID returns the project ID and plan ID from a resource name. |
| 232 | func GetProjectIDPlanID(name string) (string, int64, error) { |
no test coverage detected