Skip to content

Commit 126c98c

Browse files
committedAug 22, 2018
Address code review.
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
1 parent 08c96ba commit 126c98c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎core/commands/add.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const (
4646
cidVersionOptionName = "cid-version"
4747
hashOptionName = "hash"
4848
inlineOptionName = "inline"
49-
idHashLimitOptionName = "id-hash-limit"
49+
inlineLimitOptionName = "inline-limit"
5050
)
5151

5252
const adderOutChanSize = 8
@@ -123,8 +123,8 @@ You can now check what blocks have been created by:
123123
cmdkit.BoolOption(fstoreCacheOptionName, "Check the filestore for pre-existing blocks. (experimental)"),
124124
cmdkit.IntOption(cidVersionOptionName, "CID version. Defaults to 0 unless an option that depends on CIDv1 is passed. (experimental)"),
125125
cmdkit.StringOption(hashOptionName, "Hash function to use. Implies CIDv1 if not sha2-256. (experimental)").WithDefault("sha2-256"),
126-
cmdkit.BoolOption(inlineOptionName, "Inline small objects using identity hash. (experimental)"),
127-
cmdkit.IntOption(idHashLimitOptionName, "Identity hash maxium size. (experimental)").WithDefault(64),
126+
cmdkit.BoolOption(inlineOptionName, "Inline small blcoks into CID. (experimental)"),
127+
cmdkit.IntOption(inlineLimitOptionName, "Maximum block size to inline. (experimental)").WithDefault(64),
128128
},
129129
PreRun: func(req *cmds.Request, env cmds.Environment) error {
130130
quiet, _ := req.Options[quietOptionName].(bool)
@@ -179,7 +179,7 @@ You can now check what blocks have been created by:
179179
cidVer, cidVerSet := req.Options[cidVersionOptionName].(int)
180180
hashFunStr, _ := req.Options[hashOptionName].(string)
181181
inline, _ := req.Options[inlineOptionName].(bool)
182-
idHashLimit, _ := req.Options[idHashLimitOptionName].(int)
182+
inlineLimit, _ := req.Options[inlineLimitOptionName].(int)
183183

184184
// The arguments are subject to the following constraints.
185185
//
@@ -291,7 +291,8 @@ You can now check what blocks have been created by:
291291
if inline {
292292
fileAdder.CidBuilder = cidutil.InlineBuilder{
293293
Builder: fileAdder.CidBuilder,
294-
Limit: idHashLimit}
294+
Limit: inlineLimit,
295+
}
295296
}
296297

297298
if hash {

0 commit comments

Comments
 (0)