File tree 5 files changed +708
-505
lines changed
5 files changed +708
-505
lines changed Original file line number Diff line number Diff line change 7
7
## Table of Contents
8
8
9
9
- [ Install] ( #install )
10
+ - [ Type] ( #type )
10
11
- [ Usage] ( #usage )
12
+ - [ Importing Code constant] ( #importing-code-constant )
13
+ - [ Code from string] ( #code-from-string )
14
+ - [ Code from uint64] ( #code-from-uint64 )
11
15
- [ Generator] ( #generator )
16
+ - [ With old table.csv] ( #with-old-tablecsv )
17
+ - [ With updated table.csv] ( #with-updated-tablecsv )
12
18
- [ Maintainers] ( #maintainers )
13
19
- [ Contribute] ( #contribute )
14
20
- [ License] ( #license )
@@ -61,15 +67,31 @@ rawCode := multicodec.Code(0x55)
61
67
62
68
## Generator
63
69
70
+ ### With old table.csv
71
+
64
72
To generate the constants yourself:
65
73
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
+ ```
70
80
71
81
Note: You may need to install ` stringer ` via ` go install golang.org/x/tools/cmd/stringer ` .
72
82
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
+
73
95
## Maintainers
74
96
75
97
[ @mvdan ] ( https://github.com/mvdan ) .
You can’t perform that action at this time.
0 commit comments