From 63303c6aab8ad7e216119944f6c7f9fc0493b35e Mon Sep 17 00:00:00 2001 From: anjor Date: Thu, 18 Jul 2024 13:37:17 +0100 Subject: [PATCH] remove unused function --- cmd-car-split.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/cmd-car-split.go b/cmd-car-split.go index 7b52d55b..77b14473 100644 --- a/cmd-car-split.go +++ b/cmd-car-split.go @@ -391,29 +391,3 @@ func writeNode(node datamodel.Node, w io.Writer) (cid.Cid, error) { } return cd, nil } - -func cleanup(cp *commp.Calc, namePrefix string, i int, f *os.File) (carFile, error) { - rawCommP, paddedSize, err := cp.Digest() - if err != nil { - return carFile{}, err - } - - commCid, err := commcid.DataCommitmentV1ToCID(rawCommP) - if err != nil { - return carFile{}, err - } - - f.Close() - // oldn := fmt.Sprintf("%s%d.car", namePrefix, i) - // newn := fmt.Sprintf("%s%s.car", namePrefix, commCid) - // err = os.Rename(oldn, newn) - if err != nil { - return CarFile{}, err - } - - return CarFile{ - Name: newn, - CommP: commCid, - PaddedSize: paddedSize, - }, nil -}