Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update ./multicodec/table.csv #71

Merged
merged 2 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
## Table of Contents

- [Install](#install)
- [Type](#type)
- [Usage](#usage)
- [Importing Code constant](#importing-code-constant)
- [Code from string](#code-from-string)
- [Code from uint64](#code-from-uint64)
- [Generator](#generator)
- [With old table.csv](#with-old-tablecsv)
- [With updated table.csv](#with-updated-tablecsv)
- [Maintainers](#maintainers)
- [Contribute](#contribute)
- [License](#license)
Expand Down Expand Up @@ -61,15 +67,31 @@ rawCode := multicodec.Code(0x55)

## Generator

### With old table.csv

To generate the constants yourself:

git clone https://github.com/multiformats/go-multicodec
cd go-multicodec
git submodule init && git submodule update
go generate
```console
$ git clone https://github.com/multiformats/go-multicodec
$ cd go-multicodec
$ git submodule init && git submodule update
$ go generate
```

Note: You may need to install `stringer` via `go install golang.org/x/tools/cmd/stringer`.

### With updated table.csv

To generate the constants for the latest [table.csv](https://github.com/multiformats/multicodec/blob/master/table.csv):

```console
$ git clone https://github.com/multiformats/go-multicodec
$ cd go-multicodec
$ git submodule init
$ git submodule update --remote # updates ./multicodec/table.csv to upstream version
$ go generate
```

## Maintainers

[@mvdan](https://github.com/mvdan).
Expand Down
Loading