Skip to content

Commit

Permalink
function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor committed Jul 15, 2024
1 parent 236d15b commit 42c6165
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions cmd-car-split.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ type subsetInfo struct {
blockLinks []datamodel.Link
}

type metadata struct {
fileName string `yaml:"filename"`
firstSlot int `yaml:"firstSlot"`
lastSlot int `yaml:"lastSlot"`
cid string `yaml:"cid"`
type Metadata struct {
FileName string `yaml:"filename"`
FirstSlot int `yaml:"firstSlot"`
LastSlot int `yaml:"lastSlot"`
Cid string `yaml:"cid"`
}

func newCmd_SplitCar() *cli.Command {
Expand Down Expand Up @@ -132,11 +132,11 @@ func newCmd_SplitCar() *cli.Command {
subsetLinks = append(subsetLinks, sl)

// write metadata
m := metadata{
fileName: currentSubsetInfo.fileName,
firstSlot: currentSubsetInfo.firstSlot,
lastSlot: currentSubsetInfo.lastSlot,
cid: sl.String(),
m := Metadata{
FileName: currentSubsetInfo.fileName,
FirstSlot: currentSubsetInfo.firstSlot,
LastSlot: currentSubsetInfo.lastSlot,
Cid: sl.String(),
}

err = writeMetadata(m, epoch)
Expand Down Expand Up @@ -254,11 +254,11 @@ func newCmd_SplitCar() *cli.Command {
subsetLinks = append(subsetLinks, sl)

// write metadata
m := metadata{
fileName: currentSubsetInfo.fileName,
firstSlot: currentSubsetInfo.firstSlot,
lastSlot: currentSubsetInfo.lastSlot,
cid: sl.String(),
m := Metadata{
FileName: currentSubsetInfo.fileName,
FirstSlot: currentSubsetInfo.firstSlot,
LastSlot: currentSubsetInfo.lastSlot,
Cid: sl.String(),
}

err = writeMetadata(m, epoch)
Expand Down Expand Up @@ -359,7 +359,7 @@ func writeNode(node datamodel.Node, w io.Writer) (cid.Cid, error) {
return cd, nil
}

func writeMetadata(metadata SubsetMetadata, epoch int) error {
func writeMetadata(metadata Metadata, epoch int) error {
metadataFileName := fmt.Sprintf("epoch-%d-metadata.yaml", epoch)

// Open file in append mode
Expand Down

0 comments on commit 42c6165

Please sign in to comment.