(ctx context.Context, startingDir fs.Entry, parts []string)
| 62 | } |
| 63 | |
| 64 | func parseNestedObjectID(ctx context.Context, startingDir fs.Entry, parts []string) (object.ID, error) { |
| 65 | e, err := GetNestedEntry(ctx, startingDir, parts) |
| 66 | if err != nil { |
| 67 | return object.EmptyID, err |
| 68 | } |
| 69 | |
| 70 | hoid, ok := e.(object.HasObjectID) |
| 71 | if !ok { |
| 72 | return object.EmptyID, errors.New("entry without ObjectID") |
| 73 | } |
| 74 | |
| 75 | return hoid.ObjectID(), nil |
| 76 | } |
| 77 | |
| 78 | // FindSnapshotByRootObjectIDOrManifestID returns the list of matching snapshots for a given rootID. |
| 79 | // which can be either snapshot manifest ID (which matches 0 or 1 snapshots) |
no test coverage detected