(id string)
| 30 | } |
| 31 | |
| 32 | func parseObjectID(id string) (ObjectID, error) { |
| 33 | parts := strings.Split(id, ":") |
| 34 | if len(parts) != 2 || (parts[0] != "template" && parts[0] != "workspace") { |
| 35 | return ObjectID{}, xerrors.Errorf("invalid ID: %s", id) |
| 36 | } |
| 37 | return ObjectID{ |
| 38 | Type: ObjectType(parts[0]), |
| 39 | ID: parts[1], |
| 40 | }, nil |
| 41 | } |
| 42 | |
| 43 | func createObjectID(objectType ObjectType, id string) ObjectID { |
| 44 | return ObjectID{ |
no test coverage detected