Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 7b4836e

Browse files
authored
update the codec names for the dag put command (#248)
* update test for renamed codecs in ipld-in-ipfs * change defaults to reflect codec name changes
1 parent d8957a9 commit 7b4836e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

options/dag.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ type DagPutOption func(opts *DagPutSettings) error
1414
// DagPutOptions applies the given options to a DagPutSettings instance.
1515
func DagPutOptions(opts ...DagPutOption) (*DagPutSettings, error) {
1616
options := &DagPutSettings{
17-
InputEnc: "json",
18-
Kind: "cbor",
17+
InputEnc: "dag-json",
18+
Kind: "dag-cbor",
1919
Pin: "false",
2020
Hash: "sha2-256",
2121
}

shell_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ func TestDagPut(t *testing.T) {
421421
is := is.New(t)
422422
s := NewShell(shellUrl)
423423

424-
c, err := s.DagPut(`{"x": "abc","y":"def"}`, "json", "cbor")
424+
c, err := s.DagPut(`{"x": "abc","y":"def"}`, "dag-json", "dag-cbor")
425425
is.Nil(err)
426426
is.Equal(c, "bafyreidrm3r2k6vlxqp2fk47sboeycf7apddib47w7cyagrajtpaxxl2pi")
427427
}

0 commit comments

Comments
 (0)