ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.19k stars 3.02k forks source link

[coreapi] [feature] Add repository initialization support #4887

Open schomatis opened 6 years ago

schomatis commented 6 years ago

The doInit function (used by ipfs init) is not exported and right now the closest functionality to that is the exported fsrepo.Init but that requires taking care of the config.Config structure (and other maintenance issues taken care of by doInit).

My use case is doing benchmark tests between flatfs and badger datastores where I create a repo from scratch to measure put/get times. For me the easiest procedure at the moment is calling the ipfs init shell command directly (with exec.Command) instead of using the internal API.

schomatis commented 6 years ago

cc @magik6k