• Masih H. Derkani's avatar
    Move index generation functionality to root v2 package · 24b82536
    Masih H. Derkani authored
    Move index generation functionality to root, because they read/write CAR
    files. This leaves the `index` package to only contain the index
    implementation itself.
    
    Move `index.Attach` to root while at it following the same logic. Add
    TODOs to the implementation of Attach to make it more robust. As is it
    _could_ result in corrupt v2 files if offset includes padding since v2
    header is not updated in this function.
    
    Add tests to generate index and move existing tests to correspond to the
    go file containing generation functionality.
    24b82536
hydrate.go 467 Bytes