Skip to content

Commit 548e248

Browse files
authoredOct 17, 2022
Merge pull request #71 from multiformats/chore/update-table.csv
feat: update ./multicodec/table.csv
2 parents b2825cd + d7fb6cb commit 548e248

File tree

5 files changed

+708
-505
lines changed

5 files changed

+708
-505
lines changed
 

‎README.md

+26-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
## Table of Contents
88

99
- [Install](#install)
10+
- [Type](#type)
1011
- [Usage](#usage)
12+
- [Importing Code constant](#importing-code-constant)
13+
- [Code from string](#code-from-string)
14+
- [Code from uint64](#code-from-uint64)
1115
- [Generator](#generator)
16+
- [With old table.csv](#with-old-tablecsv)
17+
- [With updated table.csv](#with-updated-tablecsv)
1218
- [Maintainers](#maintainers)
1319
- [Contribute](#contribute)
1420
- [License](#license)
@@ -61,15 +67,31 @@ rawCode := multicodec.Code(0x55)
6167

6268
## Generator
6369

70+
### With old table.csv
71+
6472
To generate the constants yourself:
6573

66-
git clone https://github.com/multiformats/go-multicodec
67-
cd go-multicodec
68-
git submodule init && git submodule update
69-
go generate
74+
```console
75+
$ git clone https://github.com/multiformats/go-multicodec
76+
$ cd go-multicodec
77+
$ git submodule init && git submodule update
78+
$ go generate
79+
```
7080

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

83+
### With updated table.csv
84+
85+
To generate the constants for the latest [table.csv](https://github.com/multiformats/multicodec/blob/master/table.csv):
86+
87+
```console
88+
$ git clone https://github.com/multiformats/go-multicodec
89+
$ cd go-multicodec
90+
$ git submodule init
91+
$ git submodule update --remote # updates ./multicodec/table.csv to upstream version
92+
$ go generate
93+
```
94+
7395
## Maintainers
7496

7597
[@mvdan](https://github.com/mvdan).

0 commit comments

Comments
 (0)