ipfs / ipfs/go-ipld-format

It's unclear what types `Resolve(...)` can return.

Open
#25 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
65
Forks
27
PR merge metrics
No merged PRs in 30d

Description

For example, let's say that I'm expecting a number. Should I try casting to a uint64?, float?, etc. We should either provide "canonical" types aliases:

```go
type Integer uint64
type String string
// ...
```

Or return a custom type:

```go
type Value interface{}

func (v Value) Int() uint64, error {}
func (v Value) String() string, error {}
func (v Value) Nil() error {}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.