File tree 2 files changed +28
-23
lines changed
2 files changed +28
-23
lines changed Original file line number Diff line number Diff line change @@ -144,29 +144,6 @@ func NewCidV1(codecType uint64, mhash mh.Multihash) *Cid {
144
144
}
145
145
}
146
146
147
- // NewPrefixV0 returns a CIDv0 prefix with the specified multihash type.
148
- // DEPRECATED: Use FormatV0
149
- func NewPrefixV0 (mhType uint64 ) Prefix {
150
- return Prefix {
151
- MhType : mhType ,
152
- MhLength : mh .DefaultLengths [mhType ],
153
- Version : 0 ,
154
- Codec : DagProtobuf ,
155
- }
156
- }
157
-
158
- // NewPrefixV1 returns a CIDv1 prefix with the specified codec and multihash
159
- // type.
160
- // DEPRECATED: Use FormatV1
161
- func NewPrefixV1 (codecType uint64 , mhType uint64 ) Prefix {
162
- return Prefix {
163
- MhType : mhType ,
164
- MhLength : mh .DefaultLengths [mhType ],
165
- Version : 1 ,
166
- Codec : codecType ,
167
- }
168
- }
169
-
170
147
// Cid represents a self-describing content adressed
171
148
// identifier. It is formed by a Version, a Codec (which indicates
172
149
// a multicodec-packed content type) and a Multihash.
Original file line number Diff line number Diff line change
1
+ package cid
2
+
3
+ import (
4
+ mh "github.com/multiformats/go-multihash"
5
+ )
6
+
7
+ // NewPrefixV0 returns a CIDv0 prefix with the specified multihash type.
8
+ // DEPRECATED: Use FormatV0
9
+ func NewPrefixV0 (mhType uint64 ) Prefix {
10
+ return Prefix {
11
+ MhType : mhType ,
12
+ MhLength : mh .DefaultLengths [mhType ],
13
+ Version : 0 ,
14
+ Codec : DagProtobuf ,
15
+ }
16
+ }
17
+
18
+ // NewPrefixV1 returns a CIDv1 prefix with the specified codec and multihash
19
+ // type.
20
+ // DEPRECATED: Use FormatV1
21
+ func NewPrefixV1 (codecType uint64 , mhType uint64 ) Prefix {
22
+ return Prefix {
23
+ MhType : mhType ,
24
+ MhLength : mh .DefaultLengths [mhType ],
25
+ Version : 1 ,
26
+ Codec : codecType ,
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments