• Steven Allen's avatar
    feat(commands/cid): add a flag for setting the codec · e58a32ab
    Steven Allen authored
    This will be useful when testing `refs local, `repo gc`, and `repo verify`
    commands once we store blocks by multihash instead of by CID. At that point,
    these commands will return raw v1 CIDs as the blockstore won't actually remember
    the codec used to store the block.
    
    Flags choice:
    
    * Ideally, we'd use the `-f, --format` flags like every other command but we're
      already using `-f` (format) for the format string.
    * Alternatively, I'd like to use `-c`. However, we're using _that_ for a global
      `--config` flag (bit of a waste given that it doesn't work...).
    
    `--codec` will have to do for now.
    e58a32ab
cid.go 9.42 KB