ipfs / ipfs/kubo

Ambiguities concerning node.Links

Open
#2,258 1 comment 0 reactions 0 assignees View on GitHub
kind/bug need/verification
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

Let nd contain links with names `["_", "_", "__", "___"]` each with different hashes.

``` shell
> nd.AddNodeLink("_", someNode)
> nd.LinkNames
["_", "_", "__", "___", "_"] # will only get sorted when nd.Encoded()/nd.Marshal()/nd.Unmarshal() is called.
> nd.GetNodeLink("_")
# returns only the first "_", never the rest
> nd.UpdateNodeLink("_")
# all nodes with name "_" removed, leaving one "_"
> nd.AddNodeLink("_", someNode)
> nd.LinkNames
["__", "___", "_", "_"]
> nd.RemoveNodeLink("_")
> nd.LinkNames
["__", "___"]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.